diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ff708b2..db437d8 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.165 + rev: v0.0.178 hooks: - id: ruff args: ["--fix"] diff --git a/jupyter_core/application.py b/jupyter_core/application.py index 1a01121..13c45d2 100644 --- a/jupyter_core/application.py +++ b/jupyter_core/application.py @@ -31,7 +31,7 @@ # aliases and flags -base_aliases = {} +base_aliases: dict = {} if isinstance(Application.aliases, dict): # traitlets 5 base_aliases.update(Application.aliases) @@ -41,7 +41,7 @@ } base_aliases.update(_jupyter_aliases) -base_flags = {} +base_flags: dict = {} if isinstance(Application.flags, dict): # traitlets 5 base_flags.update(Application.flags) diff --git a/pyproject.toml b/pyproject.toml index 14f3e23..514f268 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,8 +51,6 @@ docs = [ "sphinxcontrib_github_alt", "traitlets", ] -lint = ["black>=22.6.0", "mdformat>0.7", "ruff>=0.0.156"] -typing = ["mypy>=0.990"] [project.scripts] jupyter = "jupyter_core.command:main" @@ -84,13 +82,14 @@ test = "python -m pytest -vv --cov jupyter_core --cov-branch --cov-report term-m nowarn = "test -W default {args}" [tool.hatch.envs.typing] -features = ["test", "typing"] +features = ["test"] dependencies = ["mypy>=0.990"] [tool.hatch.envs.typing.scripts] test = "mypy --install-types --non-interactive {args:.}" [tool.hatch.envs.lint] -features = ["lint"] +dependencies = ["black==22.10.0", "mdformat>0.7", "ruff==0.0.178"] +detached = true [tool.hatch.envs.lint.scripts] style = [ "ruff {args:.}", @@ -105,7 +104,6 @@ fmt = [ [tool.mypy] check_untyped_defs = true -disallow_any_generics = true disallow_incomplete_defs = true disallow_untyped_decorators = true no_implicit_optional = true @@ -173,7 +171,7 @@ ignore = [ # Line too long "E501", # Relative imports are banned - "I252", + "TID252", # Boolean ... in function definition "FBT001", "FBT002", # Module level import not at top of file