Skip to content

Commit

Permalink
Fix mypy no-implicit-reexport compatibility
Browse files Browse the repository at this point in the history
SQRE repositories have their mypy configured with `no-implicit-reexport` enabled, which prevents you from using symbols imported by name into a module from another module unless they are listed in __all__.

Before this change, mypy would fail with an `attr-defined` error if you tried to `from lsst.resources import ResourcePath`.
  • Loading branch information
dhirving committed Jan 19, 2024
1 parent e6e6904 commit d5a045f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/lsst/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@

"""ResourcePath is a package for abstracting access to local or remote files."""

__all__ = (
"ResourceHandleProtocol",
"ResourcePath",
"ResourcePathExpression",
)


from ._resourceHandles import ResourceHandleProtocol

# Should only expose ResourcePath and its input type alias
Expand Down

0 comments on commit d5a045f

Please sign in to comment.