diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db437d81..570f0cad 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.178 + rev: v0.0.185 hooks: - id: ruff args: ["--fix"] diff --git a/pyproject.toml b/pyproject.toml index b429a9f9..06230a49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ dependencies = ["mypy>=0.990"] test = "mypy --install-types --non-interactive {args:.}" [tool.hatch.envs.lint] -dependencies = ["black==22.10.0", "mdformat>0.7", "ruff==0.0.178"] +dependencies = ["black==22.10.0", "mdformat>0.7", "ruff==0.0.185"] detached = true [tool.hatch.envs.lint.scripts] style = [ diff --git a/traitlets/__init__.py b/traitlets/__init__.py index a3ea9f0d..be890981 100644 --- a/traitlets/__init__.py +++ b/traitlets/__init__.py @@ -8,6 +8,16 @@ from .utils.decorators import signature_has_traits from .utils.importstring import import_item +__all__ = [ + "traitlets", + "__version__", + "version_info", + "Bunch", + "signature_has_traits", + "import_item", + "Sentinel", +] + class Sentinel(traitlets.Sentinel): # type:ignore[name-defined] def __init__(self, *args, **kwargs): diff --git a/traitlets/config/__init__.py b/traitlets/config/__init__.py index c5feccc7..699b12b8 100644 --- a/traitlets/config/__init__.py +++ b/traitlets/config/__init__.py @@ -4,3 +4,15 @@ from .application import * from .configurable import * from .loader import Config + +__all__ = [ # noqa + "Config", + "Application", + "ApplicationError", + "LevelFormatter", + "configurable", + "ConfigurableError", + "MultipleInstanceError", + "LoggingConfigurable", + "SingletonConfigurable", +] diff --git a/traitlets/tests/test_traitlets.py b/traitlets/tests/test_traitlets.py index a55c04ab..b69fad44 100644 --- a/traitlets/tests/test_traitlets.py +++ b/traitlets/tests/test_traitlets.py @@ -1046,7 +1046,7 @@ def test_str_klass(self): class A(HasTraits): klass = Type("traitlets.config.Config") - from traitlets.config import Config # type:ignore + from traitlets.config import Config a = A() a.klass = Config @@ -1059,7 +1059,7 @@ class A(HasTraits): klass = Type() a = A(klass="traitlets.config.Config") - from traitlets.config import Config # type:ignore + from traitlets.config import Config self.assertEqual(a.klass, Config)