Skip to content

Commit 7d9f135

Browse files
authored
Lint and typing updates (#395)
1 parent 3951d9e commit 7d9f135

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
- id: black
3737

3838
- repo: https://github.com/charliermarsh/ruff-pre-commit
39-
rev: v0.0.260
39+
rev: v0.0.263
4040
hooks:
4141
- id: ruff
4242
args: ["--fix"]

jupyterlab_server/process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def _create_process(self, **kwargs):
174174
if os.name == "nt":
175175
kwargs["shell"] = True
176176

177-
proc = subprocess.Popen(cmd, **kwargs)
177+
proc = subprocess.Popen(cmd, **kwargs) # noqa
178178
return proc
179179

180180
@classmethod

jupyterlab_server/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def __init__(self, request: HTTPRequest, spec: Spec):
6060

6161
self.parameters = RequestParameters(
6262
query=ImmutableMultiDict(parse_qs(o.query)),
63-
header=Headers(dict(request.headers)),
63+
header=dict(request.headers),
6464
cookie=ImmutableMultiDict(cookies),
6565
path=path,
6666
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ dependencies = [
118118
"black[jupyter]==23.3.0",
119119
"mdformat>0.7",
120120
"mdformat-gfm>=0.3.5",
121-
"ruff==0.0.260"
121+
"ruff==0.0.263"
122122
]
123123
detatched = true
124124
[tool.hatch.envs.lint.scripts]

tests/test_settings_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ async def test_listing_ids(jp_fetch, labserverapp):
124124

125125
# Checks there is only the 'id' key in each item
126126
assert all(
127-
[(len(item.keys()) == 1 and list(item.keys())[0] == 'id') for item in response["settings"]]
127+
(len(item.keys()) == 1 and list(item.keys())[0] == 'id') for item in response["settings"]
128128
)
129129

130130

tests/test_translation_api.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ def setup_module(module):
3737
"""setup any state specific to the execution of this module."""
3838
for pkg in ["jupyterlab-some-package", "jupyterlab-language-pack-es_CO"]:
3939
src = os.path.join(HERE, "translations", pkg)
40-
subprocess.Popen([sys.executable, "-m", "pip", "install", src]).communicate()
40+
subprocess.Popen([sys.executable, "-m", "pip", "install", src]).communicate() # noqa
4141

4242

4343
def teardown_module(module):
4444
"""teardown any state that was previously setup."""
4545
for pkg in ["jupyterlab-some-package", "jupyterlab-language-pack-es_CO"]:
46-
subprocess.Popen([sys.executable, "-m", "pip", "uninstall", pkg, "-y"]).communicate()
46+
subprocess.Popen(
47+
[sys.executable, "-m", "pip", "uninstall", pkg, "-y"] # noqa
48+
).communicate()
4749

4850

4951
@pytest.fixture(autouse=True)

0 commit comments

Comments
 (0)