Compare commits
No commits in common. "97f7f5da2a5728b4a7500a12cc6a2de98381da6c" and "824d6273a632903de54533498a1d295aaa8109ba" have entirely different histories.
97f7f5da2a
...
824d6273a6
2
.github/workflows/validation.yml
vendored
2
.github/workflows/validation.yml
vendored
|
@ -46,4 +46,4 @@ jobs:
|
||||||
run: slotscheck -m mcproto
|
run: slotscheck -m mcproto
|
||||||
|
|
||||||
- name: Run basedpyright type checker
|
- name: Run basedpyright type checker
|
||||||
run: basedpyright --warnings .
|
run: basedpyright .
|
||||||
|
|
|
@ -36,9 +36,9 @@ repos:
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: basedpyright
|
- id: basedpyright
|
||||||
name: Based Pyright
|
name: BasedPyright
|
||||||
description: Run basedpyright type checker
|
description: Run BasedPyright type checker
|
||||||
entry: poetry run basedpyright --warnings
|
entry: poetry run basedpyright
|
||||||
language: system
|
language: system
|
||||||
types: [python]
|
types: [python]
|
||||||
pass_filenames: false # pyright runs for the entire project, it can't run for single files
|
pass_filenames: false # pyright runs for the entire project, it can't run for single files
|
||||||
|
|
|
@ -69,6 +69,8 @@ ignore = [
|
||||||
"D416", # Section name should end with a colon
|
"D416", # Section name should end with a colon
|
||||||
"D417", # Missing argument descrition in the docstring
|
"D417", # Missing argument descrition in the docstring
|
||||||
|
|
||||||
|
"ANN002", # Missing type annotation for *args
|
||||||
|
"ANN003", # Missing type annotation for **kwargs
|
||||||
"ANN101", # Missing type annotation for self in method
|
"ANN101", # Missing type annotation for self in method
|
||||||
"ANN102", # Missing type annotation for cls in classmethod
|
"ANN102", # Missing type annotation for cls in classmethod
|
||||||
"ANN204", # Missing return type annotation for special method
|
"ANN204", # Missing return type annotation for special method
|
||||||
|
@ -129,36 +131,25 @@ max-statements = 250
|
||||||
[tool.ruff.format]
|
[tool.ruff.format]
|
||||||
line-ending = "lf"
|
line-ending = "lf"
|
||||||
|
|
||||||
[tool.basedpyright]
|
[tool.pyright]
|
||||||
pythonPlatform = "All"
|
|
||||||
pythonVersion = "3.11"
|
pythonVersion = "3.11"
|
||||||
typeCheckingMode = "all"
|
typeCheckingMode = "standard"
|
||||||
|
|
||||||
# Diagnostic behavior settings
|
reportUntypedFunctionDecorator = "error"
|
||||||
strictListInference = false
|
reportUntypedClassDecorator = "error"
|
||||||
strictDictionaryInference = false
|
reportUntypedNamedTuple = "error"
|
||||||
strictSetInference = false
|
reportTypeCommentUsage = "error"
|
||||||
analyzeUnannotatedFunctions = true
|
reportConstantRedefinition = "error"
|
||||||
strictParameterNoneValue = true
|
reportDeprecated = "warning"
|
||||||
enableTypeIgnoreComments = true
|
reportIncompatibleMethodOverride = "error"
|
||||||
deprecateTypingAliases = true
|
reportOverlappingOverload = "error"
|
||||||
enableExperimentalFeatures = false
|
reportUnnecessaryIsInstance = "error"
|
||||||
disableBytesTypePromotions = true
|
reportUnnecessaryCast = "error"
|
||||||
|
reportUnnecessaryComparison = "error"
|
||||||
# Diagnostic rules
|
reportUnnecessaryContains = "error"
|
||||||
reportAny = false
|
reportUnnecessaryTypeIgnoreComment = "error"
|
||||||
reportImplicitStringConcatenation = false
|
reportImplicitOverride = "error"
|
||||||
reportUnreachable = "information"
|
reportShadowedImports = "error"
|
||||||
reportMissingTypeStubs = "information"
|
|
||||||
reportUninitializedInstanceVariable = false # until https://github.com/DetachHead/basedpyright/issues/491
|
|
||||||
reportMissingParameterType = false # ruff's flake8-annotations (ANN) already covers this + gives us more control
|
|
||||||
|
|
||||||
# Unknown type reporting rules (too strict for most code-bases)
|
|
||||||
reportUnknownArgumentType = false
|
|
||||||
reportUnknownVariableType = false
|
|
||||||
reportUnknownMemberType = false
|
|
||||||
reportUnknownParameterType = false
|
|
||||||
reportUnknownLambdaType = false
|
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
minversion = "6.0"
|
minversion = "6.0"
|
||||||
|
@ -213,7 +204,7 @@ cmd = "pytest -v --failed-first"
|
||||||
help = "Run pytest tests"
|
help = "Run pytest tests"
|
||||||
|
|
||||||
[tool.poe.tasks.pyright]
|
[tool.poe.tasks.pyright]
|
||||||
cmd = "basedpyright --warnings ."
|
cmd = "basedpyright ."
|
||||||
help = "Run BasedPyright type-checker"
|
help = "Run BasedPyright type-checker"
|
||||||
|
|
||||||
[tool.poe.tasks.retest]
|
[tool.poe.tasks.retest]
|
||||||
|
|
Loading…
Reference in a new issue