mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
refact: replace pyright with basedpyright
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -142,8 +142,8 @@ jobs:
|
|||||||
run: pdm run mypy
|
run: pdm run mypy
|
||||||
|
|
||||||
|
|
||||||
- name: Check with pyright
|
- name: Check with basedpyright
|
||||||
run: pdm run pyright
|
run: pdm run basedpyright
|
||||||
|
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
|
|||||||
53
pdm.lock
generated
53
pdm.lock
generated
@@ -5,7 +5,7 @@
|
|||||||
groups = ["default", "dev"]
|
groups = ["default", "dev"]
|
||||||
strategy = ["inherit_metadata"]
|
strategy = ["inherit_metadata"]
|
||||||
lock_version = "4.5.0"
|
lock_version = "4.5.0"
|
||||||
content_hash = "sha256:80e909dc69fd15a5392e613ee67a6bf196707436c64df6f8a4ba75c5ba8d974d"
|
content_hash = "sha256:05e3eb1c92aae73ef7e522a95ac17df2040d98776ea4e50cf815001779fd32a2"
|
||||||
|
|
||||||
[[metadata.targets]]
|
[[metadata.targets]]
|
||||||
requires_python = ">=3.10,<3.14"
|
requires_python = ">=3.10,<3.14"
|
||||||
@@ -58,6 +58,20 @@ files = [
|
|||||||
{file = "backports_tarfile-1.2.0.tar.gz", hash = "sha256:d75e02c268746e1b8144c278978b6e98e85de6ad16f8e4b0844a154557eca991"},
|
{file = "backports_tarfile-1.2.0.tar.gz", hash = "sha256:d75e02c268746e1b8144c278978b6e98e85de6ad16f8e4b0844a154557eca991"},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "basedpyright"
|
||||||
|
version = "1.29.1"
|
||||||
|
requires_python = ">=3.8"
|
||||||
|
summary = "static type checking for Python (but based)"
|
||||||
|
groups = ["dev"]
|
||||||
|
dependencies = [
|
||||||
|
"nodejs-wheel-binaries>=20.13.1",
|
||||||
|
]
|
||||||
|
files = [
|
||||||
|
{file = "basedpyright-1.29.1-py3-none-any.whl", hash = "sha256:b7eb65b9d4aaeeea29a349ac494252032a75a364942d0ac466d7f07ddeacc786"},
|
||||||
|
{file = "basedpyright-1.29.1.tar.gz", hash = "sha256:06bbe6c3b50ab4af20f80e154049477a50d8b81d2522eadbc9f472f2f92cd44b"},
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bracex"
|
name = "bracex"
|
||||||
version = "2.5.post1"
|
version = "2.5.post1"
|
||||||
@@ -391,14 +405,24 @@ files = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nodeenv"
|
name = "nodejs-wheel-binaries"
|
||||||
version = "1.9.1"
|
version = "22.15.0"
|
||||||
requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
|
requires_python = ">=3.7"
|
||||||
summary = "Node.js virtual environment builder"
|
summary = "unoffical Node.js package"
|
||||||
groups = ["dev"]
|
groups = ["dev"]
|
||||||
|
dependencies = [
|
||||||
|
"typing-extensions; python_version < \"3.8\"",
|
||||||
|
]
|
||||||
files = [
|
files = [
|
||||||
{file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"},
|
{file = "nodejs_wheel_binaries-22.15.0-py2.py3-none-macosx_11_0_arm64.whl", hash = "sha256:aa16366d48487fff89446fb237693e777aa2ecd987208db7d4e35acc40c3e1b1"},
|
||||||
{file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"},
|
{file = "nodejs_wheel_binaries-22.15.0-py2.py3-none-macosx_11_0_x86_64.whl", hash = "sha256:a54bb3fee9170003fa8abc69572d819b2b1540344eff78505fcc2129a9175596"},
|
||||||
|
{file = "nodejs_wheel_binaries-22.15.0-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:867121ccf99d10523f6878a26db86e162c4939690e24cfb5bea56d01ea696c93"},
|
||||||
|
{file = "nodejs_wheel_binaries-22.15.0-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ab0fbcda2ddc8aab7db1505d72cb958f99324b3834c4543541a305e02bfe860"},
|
||||||
|
{file = "nodejs_wheel_binaries-22.15.0-py2.py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:2bde1d8e00cd955b9ce9ee9ac08309923e2778a790ee791b715e93e487e74bfd"},
|
||||||
|
{file = "nodejs_wheel_binaries-22.15.0-py2.py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:acdd4ef73b6701aab9fbe02ac5e104f208a5e3c300402fa41ad7bc7f49499fbf"},
|
||||||
|
{file = "nodejs_wheel_binaries-22.15.0-py2.py3-none-win_amd64.whl", hash = "sha256:51deaf13ee474e39684ce8c066dfe86240edb94e7241950ca789befbbbcbd23d"},
|
||||||
|
{file = "nodejs_wheel_binaries-22.15.0-py2.py3-none-win_arm64.whl", hash = "sha256:01a3fe4d60477f93bf21a44219db33548c75d7fed6dc6e6f4c05cf0adf015609"},
|
||||||
|
{file = "nodejs_wheel_binaries-22.15.0.tar.gz", hash = "sha256:ff81aa2a79db279c2266686ebcb829b6634d049a5a49fc7dc6921e4f18af9703"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -537,21 +561,6 @@ files = [
|
|||||||
{file = "pyinstaller_hooks_contrib-2025.3.tar.gz", hash = "sha256:af129da5cd6219669fbda360e295cc822abac55b7647d03fec63a8fcf0a608cf"},
|
{file = "pyinstaller_hooks_contrib-2025.3.tar.gz", hash = "sha256:af129da5cd6219669fbda360e295cc822abac55b7647d03fec63a8fcf0a608cf"},
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pyright"
|
|
||||||
version = "1.1.400"
|
|
||||||
requires_python = ">=3.7"
|
|
||||||
summary = "Command line wrapper for pyright"
|
|
||||||
groups = ["dev"]
|
|
||||||
dependencies = [
|
|
||||||
"nodeenv>=1.6.0",
|
|
||||||
"typing-extensions>=4.1",
|
|
||||||
]
|
|
||||||
files = [
|
|
||||||
{file = "pyright-1.1.400-py3-none-any.whl", hash = "sha256:c80d04f98b5a4358ad3a35e241dbf2a408eee33a40779df365644f8054d2517e"},
|
|
||||||
{file = "pyright-1.1.400.tar.gz", hash = "sha256:b8a3ba40481aa47ba08ffb3228e821d22f7d391f83609211335858bf05686bdb"},
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pytest"
|
name = "pytest"
|
||||||
version = "8.3.5"
|
version = "8.3.5"
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ dev = [
|
|||||||
"autopep8",
|
"autopep8",
|
||||||
"ruff",
|
"ruff",
|
||||||
"mypy",
|
"mypy",
|
||||||
"pyright",
|
"basedpyright",
|
||||||
# packaging:
|
# packaging:
|
||||||
"pyinstaller",
|
"pyinstaller",
|
||||||
"platformdirs", # required by pyinstaller
|
"platformdirs", # required by pyinstaller
|
||||||
@@ -83,7 +83,7 @@ compile.cmd = "python -O -m PyInstaller pyinstaller.spec --clean"
|
|||||||
compile.env = {PYTHONHASHSEED = "1", SOURCE_DATE_EPOCH = "0"} # https://pyinstaller.org/en/stable/advanced-topics.html#creating-a-reproducible-build
|
compile.env = {PYTHONHASHSEED = "1", SOURCE_DATE_EPOCH = "0"} # https://pyinstaller.org/en/stable/advanced-topics.html#creating-a-reproducible-build
|
||||||
debug = "python -m pdb -m kleinanzeigen_bot"
|
debug = "python -m pdb -m kleinanzeigen_bot"
|
||||||
format = "autopep8 --recursive --in-place src tests --verbose"
|
format = "autopep8 --recursive --in-place src tests --verbose"
|
||||||
lint = {shell = "ruff check && mypy && pyright" }
|
lint = {shell = "ruff check && mypy && basedpyright" }
|
||||||
fix = {shell = "ruff check --fix" }
|
fix = {shell = "ruff check --fix" }
|
||||||
test = "python -m pytest --capture=tee-sys -v"
|
test = "python -m pytest --capture=tee-sys -v"
|
||||||
utest = "python -m pytest --capture=tee-sys -v -m 'not itest'"
|
utest = "python -m pytest --capture=tee-sys -v -m 'not itest'"
|
||||||
@@ -259,11 +259,11 @@ verbosity = 0
|
|||||||
|
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
# pyright
|
# basedpyright
|
||||||
# https://github.com/microsoft/pyright/
|
# https://github.com/detachhead/basedpyright
|
||||||
#####################
|
#####################
|
||||||
[tool.pyright]
|
[tool.basedpyright]
|
||||||
# https://microsoft.github.io/pyright/#/configuration?id=main-configuration-options
|
# https://docs.basedpyright.com/latest/configuration/config-files/
|
||||||
include = ["src", "tests"]
|
include = ["src", "tests"]
|
||||||
defineConstant = { DEBUG = false }
|
defineConstant = { DEBUG = false }
|
||||||
pythonVersion = "3.10"
|
pythonVersion = "3.10"
|
||||||
|
|||||||
Reference in New Issue
Block a user