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 rule #1128

Merged
merged 6 commits into from
Dec 13, 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.177
hooks:
- id: ruff
args: ["--fix"]
1 change: 0 additions & 1 deletion jupyter_server/extension/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

from .handler import ExtensionHandlerMixin


# -----------------------------------------------------------------------------
# Util functions and classes.
# -----------------------------------------------------------------------------
Expand Down
20 changes: 9 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ test = [
"requests",
"pre-commit"
]
lint = [
"black>=22.6.0",
"mdformat>0.7",
"ruff>=0.0.156",
]
docs = [
# needed because m2r uses deprecated APIs
# m2r is depended on by sphinxcontrib-openapi
Expand All @@ -88,9 +83,6 @@ docs = [
"sphinxemoji",
"tornado",
]
typing = [
"mypy>=0.990"
]

[project.scripts]
jupyter-server = "jupyter_server.serverapp:main"
Expand All @@ -107,7 +99,8 @@ test = "python -m pytest -vv {args}"
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:.}"

Expand All @@ -120,7 +113,12 @@ nowarn = "test -W default {args}"
integration = "test --integration_tests=true {args}"

[tool.hatch.envs.lint]
features = ["lint"]
detached = true
dependencies = [
"black>=22.10.0",
"mdformat>0.7",
"ruff==0.0.177",
]
[tool.hatch.envs.lint.scripts]
style = [
"ruff {args:.}",
Expand Down Expand Up @@ -174,7 +172,7 @@ ignore = [
# Line too long
"E501",
# Relative imports are banned
"I252",
"TID252",
# Boolean ... in function definition
"FBT001",
"FBT002",
Expand Down
1 change: 0 additions & 1 deletion tests/services/events/mockextension/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from .mock_extension import _load_jupyter_server_extension # noqa: F401


# Function that makes these extensions discoverable
# by the test functions.

Expand Down