diff --git a/jwst/associations/association.py b/jwst/associations/association.py index e6edce4b75..092d980b94 100644 --- a/jwst/associations/association.py +++ b/jwst/associations/association.py @@ -84,7 +84,7 @@ class Association(MutableMapping): attribute is not specified. """ - ioregistry = IORegistry() + ioregistry: IORegistry = IORegistry() """The association IO registry""" def __init__( diff --git a/jwst/associations/association_io.py b/jwst/associations/association_io.py index 5ce8c451a1..d768a20118 100644 --- a/jwst/associations/association_io.py +++ b/jwst/associations/association_io.py @@ -14,7 +14,7 @@ logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) -__all__ = [] +__all__: list = [] # Define JSON encoder to convert `Member` to `dict` diff --git a/jwst/associations/lib/constraint.py b/jwst/associations/lib/constraint.py index ed3c3d1c35..a3c270426f 100644 --- a/jwst/associations/lib/constraint.py +++ b/jwst/associations/lib/constraint.py @@ -56,7 +56,7 @@ class SimpleConstraintABC(abc.ABC): """ # Attributes to show in the string representation. - _str_attrs = ('name', 'value') + _str_attrs: tuple = ('name', 'value') def __new__(cls, *args, **kwargs): """Force creation of the constraint attribute dict before anything else.""" diff --git a/jwst/associations/tests/helpers.py b/jwst/associations/tests/helpers.py index 11878d4dbe..82c77cc41a 100644 --- a/jwst/associations/tests/helpers.py +++ b/jwst/associations/tests/helpers.py @@ -56,11 +56,11 @@ class BasePoolRule(): # Define the pools and testing parameters related to them. # Each entry is a tuple starting with the path of the pool. - pools = [] + pools: list = [] # Define the rules that SHOULD be present. # Each entry is the class name of the rule. - valid_rules = [] + valid_rules: list = [] def test_rules_exist(self): rules = registry_level3_only() diff --git a/pyproject.toml b/pyproject.toml index 3042bec11f..a35d0da61d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -292,10 +292,7 @@ lint.ignore = [ python_version = "3.12" warn_return_any = true warn_unused_configs = true -disable_error_code = [ - "import-untyped", # do not check imports - "attr-defined", # temporarily ignore jwst.datamodels not found errors, find better way later, remove before merge -] +disable_error_code = "import-untyped" # do not check imports exclude = ["build"] [[tool.mypy.overrides]] @@ -309,10 +306,10 @@ module = [ ] ignore_missing_imports = true -# be sure to remove before merge -[[tool.mypy.overrides]] -module = ["jwst.associations.*", "jwst.lib.set_telescope_pointing"] -ignore_errors = true +# # be sure to remove before merge +# [[tool.mypy.overrides]] +# module = ["jwst.lib.set_telescope_pointing"] +# ignore_errors = true [tool.towncrier] filename = "CHANGES.rst"