Skip to content

Commit f0ea095

Browse files
authored
Fix lint (#325)
* fix lint * fix lint rule
1 parent bc81ed6 commit f0ea095

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ repos:
3434
- id: black
3535

3636
- repo: https://github.com/charliermarsh/ruff-pre-commit
37-
rev: v0.0.165
37+
rev: v0.0.178
3838
hooks:
3939
- id: ruff
4040
args: ["--fix"]

jupyter_core/application.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
# aliases and flags
3333

34-
base_aliases = {}
34+
base_aliases: dict = {}
3535
if isinstance(Application.aliases, dict):
3636
# traitlets 5
3737
base_aliases.update(Application.aliases)
@@ -41,7 +41,7 @@
4141
}
4242
base_aliases.update(_jupyter_aliases)
4343

44-
base_flags = {}
44+
base_flags: dict = {}
4545
if isinstance(Application.flags, dict):
4646
# traitlets 5
4747
base_flags.update(Application.flags)

pyproject.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ docs = [
5151
"sphinxcontrib_github_alt",
5252
"traitlets",
5353
]
54-
lint = ["black>=22.6.0", "mdformat>0.7", "ruff>=0.0.156"]
55-
typing = ["mypy>=0.990"]
5654

5755
[project.scripts]
5856
jupyter = "jupyter_core.command:main"
@@ -84,13 +82,14 @@ test = "python -m pytest -vv --cov jupyter_core --cov-branch --cov-report term-m
8482
nowarn = "test -W default {args}"
8583

8684
[tool.hatch.envs.typing]
87-
features = ["test", "typing"]
85+
features = ["test"]
8886
dependencies = ["mypy>=0.990"]
8987
[tool.hatch.envs.typing.scripts]
9088
test = "mypy --install-types --non-interactive {args:.}"
9189

9290
[tool.hatch.envs.lint]
93-
features = ["lint"]
91+
dependencies = ["black==22.10.0", "mdformat>0.7", "ruff==0.0.178"]
92+
detached = true
9493
[tool.hatch.envs.lint.scripts]
9594
style = [
9695
"ruff {args:.}",
@@ -105,7 +104,6 @@ fmt = [
105104

106105
[tool.mypy]
107106
check_untyped_defs = true
108-
disallow_any_generics = true
109107
disallow_incomplete_defs = true
110108
disallow_untyped_decorators = true
111109
no_implicit_optional = true
@@ -173,7 +171,7 @@ ignore = [
173171
# Line too long
174172
"E501",
175173
# Relative imports are banned
176-
"I252",
174+
"TID252",
177175
# Boolean ... in function definition
178176
"FBT001", "FBT002",
179177
# Module level import not at top of file

0 commit comments

Comments
 (0)