Skip to content

Commit

Permalink
Fix lint (#814)
Browse files Browse the repository at this point in the history
* fix lint

* fix typing

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
blink1073 and pre-commit-ci[bot] committed Dec 15, 2022
1 parent e0e5024 commit 1dbf7e9
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -34,7 +34,7 @@ repos:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.165
rev: v0.0.178
hooks:
- id: ruff
args: ["--fix"]
9 changes: 4 additions & 5 deletions pyproject.toml
Expand Up @@ -28,8 +28,6 @@ docs = [
"pydata-sphinx-theme",
"sphinx"
]
lint = ["black>=22.6.0", "mdformat>0.7", "ruff>=0.0.156"]
typing = ["mypy>=0.990"]

[tool.hatch.version]
path = "traitlets/_version.py"
Expand All @@ -53,13 +51,14 @@ test = "python -m pytest -vv --cov traitlets --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.178"]
detached = true
[tool.hatch.envs.lint.scripts]
style = [
"ruff {args:.}",
Expand Down Expand Up @@ -161,7 +160,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
1 change: 0 additions & 1 deletion traitlets/config/configurable.py
Expand Up @@ -24,7 +24,6 @@

from .loader import Config, DeferredConfig, LazyConfigValue, _is_section_key


# -----------------------------------------------------------------------------
# Helper classes for Configurables
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion traitlets/config/loader.py
Expand Up @@ -16,7 +16,6 @@

from ..utils import cast_unicode, filefind


# -----------------------------------------------------------------------------
# Exceptions
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion traitlets/tests/test_traitlets_enum.py
Expand Up @@ -8,7 +8,6 @@

from traitlets import CaselessStrEnum, Enum, FuzzyEnum, HasTraits, TraitError, UseEnum


# -----------------------------------------------------------------------------
# TEST SUPPORT:
# -----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion traitlets/utils/getargspec.py
Expand Up @@ -11,7 +11,6 @@
import inspect
from functools import partial


# Unmodified from sphinx below this line


Expand Down

0 comments on commit 1dbf7e9

Please sign in to comment.