Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint #325

Merged
merged 3 commits into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
4 changes: 2 additions & 2 deletions jupyter_core/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

# aliases and flags

base_aliases = {}
base_aliases: dict = {}
if isinstance(Application.aliases, dict):
# traitlets 5
base_aliases.update(Application.aliases)
Expand All @@ -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)
Expand Down
10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:.}",
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down