diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9aa4daacc..9a88c66b0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -95,7 +95,7 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.22 + rev: v0.16.1 hooks: - id: ruff-check types_or: [python, jupyter] diff --git a/ipykernel/__init__.py b/ipykernel/__init__.py index 978700d30..bc5fbb726 100644 --- a/ipykernel/__init__.py +++ b/ipykernel/__init__.py @@ -4,4 +4,4 @@ kernel_protocol_version_info, version_info, ) -from .connect import * # noqa: F403 +from .connect import * diff --git a/ipykernel/compiler.py b/ipykernel/compiler.py index 6652e08ae..f22c21fd7 100644 --- a/ipykernel/compiler.py +++ b/ipykernel/compiler.py @@ -46,7 +46,7 @@ def murmur2_x86(data, seed): return h -convert_to_long_pathname = lambda filename: filename # noqa: E731 +convert_to_long_pathname = lambda filename: filename if sys.platform == "win32": try: diff --git a/ipykernel/gui/gtk3embed.py b/ipykernel/gui/gtk3embed.py index ab4ec2226..91b5b4942 100644 --- a/ipykernel/gui/gtk3embed.py +++ b/ipykernel/gui/gtk3embed.py @@ -18,7 +18,7 @@ gi.require_version("Gdk", "3.0") gi.require_version("Gtk", "3.0") -from gi.repository import GObject, Gtk # noqa: E402 +from gi.repository import GObject, Gtk warnings.warn( "The Gtk3 event loop for ipykernel is deprecated", category=DeprecationWarning, stacklevel=2 diff --git a/ipykernel/ipkernel.py b/ipykernel/ipkernel.py index 7ce9cc013..078d20c4a 100644 --- a/ipykernel/ipkernel.py +++ b/ipykernel/ipkernel.py @@ -394,7 +394,7 @@ async def do_execute( should_run_async = shell.should_run_async accepts_params = _accepts_parameters(run_cell, ["cell_id", "cell_meta"]) else: - should_run_async = lambda cell: False # noqa: ARG005, E731 + should_run_async = lambda cell: False # noqa: ARG005 # older IPython, # use blocking run_cell and wrap it in coroutine diff --git a/ipykernel/pylab/backend_inline.py b/ipykernel/pylab/backend_inline.py index 2ce3716b8..abc8af673 100644 --- a/ipykernel/pylab/backend_inline.py +++ b/ipykernel/pylab/backend_inline.py @@ -5,7 +5,7 @@ import warnings -from matplotlib_inline.backend_inline import * # noqa: F403 # analysis: ignore +from matplotlib_inline.backend_inline import * # analysis: ignore warnings.warn( "`ipykernel.pylab.backend_inline` is deprecated, directly " diff --git a/ipykernel/pylab/config.py b/ipykernel/pylab/config.py index 8c3a63ab4..bbe537463 100644 --- a/ipykernel/pylab/config.py +++ b/ipykernel/pylab/config.py @@ -5,7 +5,7 @@ import warnings -from matplotlib_inline.config import * # noqa: F403 # analysis: ignore +from matplotlib_inline.config import * # analysis: ignore warnings.warn( "`ipykernel.pylab.config` is deprecated, directly use `matplotlib_inline.config`",