mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-10-01 03:43:42 +08:00
move mypy config into pyproject.toml (#29501)
* move mypy config into pyproject.toml * rm reference
This commit is contained in:
@@ -64,7 +64,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE
|
cd $GITHUB_WORKSPACE
|
||||||
cp .pre-commit-config.yaml $STRIPPED_DIR
|
cp .pre-commit-config.yaml $STRIPPED_DIR
|
||||||
cp mypy.ini $STRIPPED_DIR
|
|
||||||
cp pyproject.toml $STRIPPED_DIR
|
cp pyproject.toml $STRIPPED_DIR
|
||||||
cp poetry.lock $STRIPPED_DIR
|
cp poetry.lock $STRIPPED_DIR
|
||||||
cd $STRIPPED_DIR
|
cd $STRIPPED_DIR
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
[mypy]
|
|
||||||
python_version = 3.11
|
|
||||||
plugins = numpy.typing.mypy_plugin
|
|
||||||
files = body, common, docs, scripts, selfdrive, site_scons, system, tools
|
|
||||||
exclude = ^(cereal/)|(opendbc/)|(panda/)|(laika/)|(laika_repo/)|(rednose/)|(rednose_repo/)|(tinygrad/)|(tinygrad_repo/)|(xx/)
|
|
||||||
|
|
||||||
; third-party packages
|
|
||||||
ignore_missing_imports = True
|
|
||||||
|
|
||||||
; helpful warnings
|
|
||||||
warn_redundant_casts = True
|
|
||||||
warn_unreachable = True
|
|
||||||
warn_unused_ignores = True
|
|
||||||
|
|
||||||
; restrict dynamic typing
|
|
||||||
warn_return_any = True
|
|
||||||
@@ -4,6 +4,37 @@ addopts = "--ignore=panda/ --ignore=rednose_repo/ --ignore=tinygrad_repo/ --igno
|
|||||||
python_files = "test_*.py"
|
python_files = "test_*.py"
|
||||||
timeout = "30" # you get this long by default
|
timeout = "30" # you get this long by default
|
||||||
|
|
||||||
|
[tool.mypy]
|
||||||
|
python_version = "3.11"
|
||||||
|
plugins = [
|
||||||
|
"numpy.typing.mypy_plugin",
|
||||||
|
]
|
||||||
|
exclude = [
|
||||||
|
"body/",
|
||||||
|
"cereal/",
|
||||||
|
"opendbc/",
|
||||||
|
"panda/",
|
||||||
|
"laika/",
|
||||||
|
"laika_repo/",
|
||||||
|
"rednose/",
|
||||||
|
"rednose_repo/",
|
||||||
|
"tinygrad/",
|
||||||
|
"tinygrad_repo/",
|
||||||
|
"third_party/",
|
||||||
|
]
|
||||||
|
|
||||||
|
# third-party packages
|
||||||
|
ignore_missing_imports=true
|
||||||
|
|
||||||
|
# helpful warnings
|
||||||
|
warn_redundant_casts=true
|
||||||
|
warn_unreachable=true
|
||||||
|
warn_unused_ignores=true
|
||||||
|
|
||||||
|
# restrict dynamic typing
|
||||||
|
warn_return_any=true
|
||||||
|
|
||||||
|
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "openpilot"
|
name = "openpilot"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user