Skip to content

Commit

Permalink
fixing as many association-related problems as possible, un-hiding fa…
Browse files Browse the repository at this point in the history
…ilures
  • Loading branch information
emolter committed Oct 2, 2024
1 parent eac51ae commit 91e473e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion jwst/associations/association.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Association(MutableMapping):
attribute is not specified.
"""

ioregistry = IORegistry()
ioregistry: IORegistry = IORegistry()
"""The association IO registry"""

def __init__(
Expand Down
2 changes: 1 addition & 1 deletion jwst/associations/association_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())

__all__ = []
__all__: list = []


# Define JSON encoder to convert `Member` to `dict`
Expand Down
2 changes: 1 addition & 1 deletion jwst/associations/lib/constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
4 changes: 2 additions & 2 deletions jwst/associations/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
13 changes: 5 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand All @@ -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"
Expand Down

0 comments on commit 91e473e

Please sign in to comment.