diff --git a/metadata-ingestion/setup.cfg b/metadata-ingestion/setup.cfg index 2467c61983e5d..f1cc51e5d4495 100644 --- a/metadata-ingestion/setup.cfg +++ b/metadata-ingestion/setup.cfg @@ -26,6 +26,7 @@ plugins = pydantic.mypy exclude = ^(venv|build|dist)/ ignore_missing_imports = yes +namespace_packages = no strict_optional = yes check_untyped_defs = yes disallow_incomplete_defs = yes diff --git a/metadata-ingestion/setup.py b/metadata-ingestion/setup.py index c81ac28577ff3..8fe81dcab36d7 100644 --- a/metadata-ingestion/setup.py +++ b/metadata-ingestion/setup.py @@ -373,7 +373,10 @@ def get_long_description(): "flake8>=3.8.3", "flake8-tidy-imports>=4.3.0", "isort>=5.7.0", - "mypy>=0.981", + # mypy 0.990 enables namespace packages by default and sets + # no implicit optional to True. + # FIXME: Enable mypy 0.990 when our codebase is fixed. + "mypy>=0.981,<0.990", # pydantic 1.8.2 is incompatible with mypy 0.910. # See https://github.com/samuelcolvin/pydantic/pull/3175#issuecomment-995382910. # Restricting top version to <1.10 until we can fix our types.