Skip to content

Commit

Permalink
Fix lint (#1058)
Browse files Browse the repository at this point in the history
fix lint
  • Loading branch information
blink1073 committed Dec 14, 2022
1 parent a7455bc commit 04e1d75
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -33,7 +33,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 examples/embedding/ipkernel_wxapp.py
Expand Up @@ -24,7 +24,6 @@
import wx
from internal_ipkernel import InternalIPKernel


# -----------------------------------------------------------------------------
# Functions and classes
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/embed.py
Expand Up @@ -10,7 +10,6 @@

from .kernelapp import IPKernelApp


# -----------------------------------------------------------------------------
# Code
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/gui/gtk3embed.py
Expand Up @@ -23,7 +23,6 @@
gi.require_version("Gtk", "3.0")
from gi.repository import GObject, Gtk


# -----------------------------------------------------------------------------
# Classes and functions
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/gui/gtkembed.py
Expand Up @@ -20,7 +20,6 @@
import gobject
import gtk


# -----------------------------------------------------------------------------
# Classes and functions
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/heartbeat.py
Expand Up @@ -20,7 +20,6 @@
import zmq
from jupyter_client.localinterfaces import localhost


# -----------------------------------------------------------------------------
# Code
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/inprocess/channels.py
Expand Up @@ -7,7 +7,6 @@

from jupyter_client.channelsabc import HBChannelABC


# -----------------------------------------------------------------------------
# Channel classes
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/inprocess/client.py
Expand Up @@ -27,7 +27,6 @@
# Local imports
from .channels import InProcessChannel, InProcessHBChannel


# -----------------------------------------------------------------------------
# Main kernel Client class
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/inprocess/ipkernel.py
Expand Up @@ -18,7 +18,6 @@
from .constants import INPROCESS_KEY
from .socket import DummySocket


# -----------------------------------------------------------------------------
# Main kernel class
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/inprocess/socket.py
Expand Up @@ -8,7 +8,6 @@
import zmq
from traitlets import HasTraits, Instance, Int


# -----------------------------------------------------------------------------
# Dummy socket class
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/inprocess/tests/test_kernelmanager.py
Expand Up @@ -5,7 +5,6 @@

from ipykernel.inprocess.manager import InProcessKernelManager


# -----------------------------------------------------------------------------
# Test case
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/serialize.py
Expand Up @@ -41,7 +41,6 @@

from jupyter_client.session import MAX_BYTES, MAX_ITEMS


# -----------------------------------------------------------------------------
# Serialization Functions
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/zmqshell.py
Expand Up @@ -38,7 +38,6 @@
from ipykernel.displayhook import ZMQShellDisplayHook
from ipykernel.jsonutil import encode_images, json_clean


# -----------------------------------------------------------------------------
# Functions and classes
# -----------------------------------------------------------------------------
Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Expand Up @@ -62,8 +62,6 @@ cov = [
"curio",
"trio",
]
lint = ["black>=22.6.0", "mdformat>0.7", "ruff>=0.0.156"]
typing = ["mypy>=0.990"]

[tool.hatch.version]
path = "ipykernel/_version.py"
Expand Down Expand Up @@ -95,13 +93,14 @@ test = "python -m pytest -vv --cov ipykernel --cov-branch --cov-report term-miss
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:.}"

[tool.hatch.envs.lint]
features = ["lint"]
dependencies = ["black==22.10.0", "mdformat>0.7", "ruff==0.0.177"]
detached = true
[tool.hatch.envs.lint.scripts]
style = [
"ruff {args:.}",
Expand Down Expand Up @@ -212,7 +211,7 @@ ignore = [
# Line too long
"E501",
# Relative imports are banned
"I252",
"TID252",
# Boolean ... in function definition
"FBT001", "FBT002",
# Module level import not at top of file
Expand Down

0 comments on commit 04e1d75

Please sign in to comment.