Skip to content

Commit

Permalink
Update from skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Aug 12, 2024
1 parent 733e2ec commit 863e532
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
30 changes: 20 additions & 10 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
[mypy]
# CI should test for all versions, local development gets hints for oldest supported
# Some upstream typeshed distutils stubs fixes are necessary before we can start testing on Python 3.12
python_version = 3.8
## upstream

# Is the project well-typed?
strict = False

# Early opt-in even when strict = False
warn_unused_ignores = True
warn_redundant_casts = True
# required to support namespace packages: https://github.com/python/mypy/issues/14057
enable_error_code = ignore-without-code

# Support namespace packages per https://github.com/python/mypy/issues/14057
explicit_package_bases = True

# Disable overload-overlap due to many false-positives
disable_error_code = overload-overlap

# CI should test for all versions, local development gets hints for oldest supported
# Some upstream typeshed distutils stubs fixes are necessary before we can start testing on Python 3.12
python_version = 3.8

## local

exclude = (?x)(
^build/
| ^.tox/
Expand All @@ -16,9 +30,6 @@ exclude = (?x)(
| ^setuptools/_distutils/ # Vendored
| ^setuptools/config/_validate_pyproject/ # Auto-generated
)
# Too many false-positives
disable_error_code = overload-overlap
enable_error_code = ignore-without-code

# DistributionMetadata.license_files and DistributionMetadata.license_file
# are dynamically patched in setuptools/_core_metadata.py
Expand All @@ -35,12 +46,11 @@ disable_error_code = import-not-found
# - All jaraco modules are still untyped
# - _validate_project sometimes complains about trove_classifiers (#4296)
# - wheel appears to be untyped
# - _aix_support is untyped
[mypy-distutils._modified,jaraco.*,trove_classifiers,wheel.*,_aix_support]
[mypy-distutils._modified,jaraco.*,trove_classifiers,wheel.*]
ignore_missing_imports = True

# Even when excluding a module, import issues can show up due to following import
# https://github.com/python/mypy/issues/11936#issuecomment-1466764006
[mypy-setuptools.config._validate_pyproject.*]
[mypy-setuptools._distutils.*,setuptools.config._validate_pyproject.*]
follow_imports = silent
# silent => ignore errors when following imports
8 changes: 4 additions & 4 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ extend-select = [

# local
"ANN2", # missing-return-type-*
"FA", # flake8-future-annotations
"F404", # late-future-import
"FA", # flake8-future-annotations
"I", # isort
"PGH", # pygrep-hooks (blanket-* rules)
"PYI", # flake8-pyi
"RUF100", # unused-noqa
"TRY", # tryceratops
"UP", # pyupgrade
"TRY",
"YTT", # flake8-2020
"PGH", # pygrep-hooks (blanket-* rules)
"RUF100", # unused-noqa
]
ignore = [
"TRY003", # raise-vanilla-args, avoid multitude of exception classes
Expand Down

0 comments on commit 863e532

Please sign in to comment.