Skip to content

Commit a895ce7

Browse files
[pre-commit.ci] pre-commit autoupdate (#1104)Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Silvester <[email protected]>
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/charliermarsh/ruff-pre-commit: v0.0.243 → v0.0.254](astral-sh/ruff-pre-commit@v0.0.243...v0.0.254) * sync deps and lint * lint * lint * lint --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Silvester <[email protected]>
1 parent ba3c113 commit a895ce7

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
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.243
39+
rev: v0.0.254
4040
hooks:
4141
- id: ruff
4242
args: ["--fix"]

ipykernel/ipkernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def _create_comm(*args, **kwargs):
5555

5656
def _get_comm_manager(*args, **kwargs):
5757
"""Create a new CommManager."""
58-
global _comm_manager
58+
global _comm_manager # noqa
5959
if _comm_manager is None:
6060
with _comm_lock:
6161
if _comm_manager is None:

ipykernel/kernelapp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ def init_blackhole(self):
449449
if self.no_stdout or self.no_stderr:
450450
blackhole = open(os.devnull, "w") # noqa
451451
if self.no_stdout:
452-
sys.stdout = sys.__stdout__ = blackhole
452+
sys.stdout = sys.__stdout__ = blackhole # type:ignore
453453
if self.no_stderr:
454-
sys.stderr = sys.__stderr__ = blackhole
454+
sys.stderr = sys.__stderr__ = blackhole # type:ignore
455455

456456
def init_io(self):
457457
"""Redirect input streams and set a display hook."""

ipykernel/pickleutil.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def use_dill():
7777
# dill doesn't work with cPickle,
7878
# tell the two relevant modules to use plain pickle
7979

80-
global pickle
80+
global pickle # noqa
8181
pickle = dill
8282

8383
try:
@@ -98,7 +98,7 @@ def use_cloudpickle():
9898
"""
9999
import cloudpickle
100100

101-
global pickle
101+
global pickle # noqa
102102
pickle = cloudpickle
103103

104104
try:
@@ -278,9 +278,9 @@ def __init__(self, obj):
278278
self.shape = obj.shape
279279
self.dtype = obj.dtype.descr if obj.dtype.fields else obj.dtype.str
280280
self.pickled = False
281-
if sum(obj.shape) == 0:
281+
if sum(obj.shape) == 0: # noqa
282282
self.pickled = True
283-
elif obj.dtype == "O":
283+
elif obj.dtype == "O": # noqa
284284
# can't handle object dtype with buffer approach
285285
self.pickled = True
286286
elif obj.dtype.fields and any(dt == "O" for dt, sz in obj.dtype.fields.values()):

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ dependencies = ["mypy>=0.990"]
116116
test = "mypy --install-types --non-interactive {args:.}"
117117

118118
[tool.hatch.envs.lint]
119-
dependencies = ["black==23.1.0", "mdformat>0.7", "ruff==0.0.243"]
119+
dependencies = ["black==23.1.0", "mdformat>0.7", "ruff==0.0.254"]
120120
detached = true
121121
[tool.hatch.envs.lint.scripts]
122122
style = [
@@ -294,7 +294,9 @@ unfixable = [
294294
# F841 Local variable `t` is assigned to but never used
295295
# EM101 Exception must not use a string literal, assign to variable first
296296
# PLR2004 Magic value used in comparison
297-
"ipykernel/tests/*" = ["B011", "F841", "C408", "E402", "T201", "B007", "N802", "F841", "EM101", "EM102", "EM103", "PLR2004"]
297+
# PLW0603 Using the global statement to update ...
298+
# PLW2901 `for` loop variable ...
299+
"ipykernel/tests/*" = ["B011", "F841", "C408", "E402", "T201", "B007", "N802", "F841", "EM101", "EM102", "EM103", "PLR2004", "PLW0603", "PLW2901"]
298300

299301
[tool.interrogate]
300302
ignore-init-module=true

0 commit comments

Comments
 (0)