Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-27689: extend static type checking and fix errors #441

Merged
merged 4 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
70 changes: 23 additions & 47 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ ignore_missing_imports = True
[mypy-backoff]
ignore_missing_imports = True

[mypy-numpy.*]
ignore_missing_imports = True

[mypy-pyarrow.*]
ignore_missing_imports = True

[mypy-pandas.*]
ignore_missing_imports = True

[mypy-boto3]
ignore_missing_imports = True

Expand All @@ -27,9 +36,9 @@ ignore_missing_imports = True
ignore_missing_imports = True
ignore_errors = True

# Check all of core...
# Check all of daf.butler...

[mypy-lsst.daf.butler.core.*]
[mypy-lsst.daf.butler.*]
ignore_missing_imports = False
ignore_errors = False
disallow_untyped_defs = True
Expand All @@ -42,58 +51,25 @@ warn_unused_ignores = True
# breaks in the lists of modules).

[mypy-lsst.daf.butler.core.config]
ignore_errors = True

# Check registry subpackage.

[mypy-lsst.daf.butler.registry.*]
ignore_missing_imports = False
ignore_errors = False
disallow_untyped_defs = True
disallow_incomplete_defs = True
strict_equality = True
warn_unreachable = True
warn_unused_ignores = True
disallow_untyped_defs = False
warn_unreachable = False

[mypy-lsst.daf.butler.registry.queries.exprParser.ply.*]
ignore_errors = True

[mypy-lsst.daf.butler.registry.tests.*]
[mypy-lsst.daf.butler.tests.*]
ignore_errors = True

# Check transfers subpackage

[mypy-lsst.daf.butler.transfers.*]
ignore_missing_imports = False
ignore_errors = False
disallow_untyped_defs = True
disallow_incomplete_defs = True
strict_equality = True
warn_unreachable = True
warn_unused_ignores = True


# Check concrete datastores.
[mypy-lsst.daf.butler.cli.*]
ignore_errors = True

[mypy-lsst.daf.butler.datastores.*]
ignore_missing_imports = False
ignore_errors = False
disallow_untyped_defs = True
disallow_incomplete_defs = True
strict_equality = True
warn_unreachable = True
warn_unused_ignores = True
[mypy-lsst.daf.butler.script.*]
disallow_untyped_defs = False

# Formatters
[mypy-lsst.daf.butler.registry.tests.*]
ignore_errors = True

[mypy-lsst.daf.butler.formatters.*]
ignore_missing_imports = False
ignore_errors = False
disallow_untyped_defs = True
disallow_incomplete_defs = True
strict_equality = True
warn_unreachable = True
warn_unused_ignores = True
# version.py is added by scons and may not exist when we run mypy.

[mypy-lsst.daf.butler.formatters.parquet]
ignore_errors = True
[mypy-lsst.daf.butler.version]
ignore_missing_imports = True