Skip to content

Commit

Permalink
Extended the ruff rule list and applied fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed May 8, 2024
1 parent 376373b commit bd8ab85
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 20 deletions.
13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,16 @@ omit = ["*/vendored/*"]
[tool.coverage.report]
show_missing = true

[tool.ruff]
line-length = 88
src = ["src"]

[tool.ruff.lint]
select = [
"E", "F", "W", # default flake-8
extend-select = [
"B", # flake8-bugbear
"G", # flake8-logging-format
"I", # isort
"ISC", # flake8-implicit-str-concat
"PGH", # pygrep-hooks
"RUF100", # unused noqa (yesqa)
"UP", # pyupgrade
"B", # flake8-bugbear
"W", # pycodestyle warnings
]

# Tox (https://tox.wiki/) is a tool for running tests in multiple virtualenvs.
Expand Down
14 changes: 7 additions & 7 deletions src/wheel/bdist_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_flag(
if val is None:
if warn:
warnings.warn(
f"Config variable '{var}' is unset, Python ABI tag may " "be incorrect",
f"Config variable '{var}' is unset, Python ABI tag may be incorrect",
RuntimeWarning,
stacklevel=2,
)
Expand Down Expand Up @@ -192,23 +192,23 @@ class bdist_wheel(Command):
(
"relative",
None,
"build the archive using relative paths " "(default: false)",
"build the archive using relative paths (default: false)",
),
(
"owner=",
"u",
"Owner name used when creating a tar file" " [default: current user]",
"Owner name used when creating a tar file [default: current user]",
),
(
"group=",
"g",
"Group name used when creating a tar file" " [default: current group]",
"Group name used when creating a tar file [default: current group]",
),
("universal", None, "make a universal wheel" " (default: false)"),
("universal", None, "make a universal wheel (default: false)"),
(
"compression=",
None,
"zipfile compression (one of: {})" " (default: 'deflated')".format(
"zipfile compression (one of: {}) (default: 'deflated')".format(
", ".join(supported_compressions)
),
),
Expand All @@ -228,7 +228,7 @@ class bdist_wheel(Command):
(
"py-limited-api=",
None,
"Python tag (cp32|cp33|cpNN) for abi3 wheel tag" " (default: false)",
"Python tag (cp32|cp33|cpNN) for abi3 wheel tag (default: false)",
),
]

Expand Down
1 change: 0 additions & 1 deletion tests/cli/test_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from zipfile import ZipFile

import pytest

from wheel.cli.pack import pack

THISDIR = os.path.dirname(__file__)
Expand Down
1 change: 0 additions & 1 deletion tests/cli/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from zipfile import ZipFile

import pytest

from wheel.cli import main, parser
from wheel.cli.tags import tags
from wheel.wheelfile import WheelFile
Expand Down
1 change: 0 additions & 1 deletion tests/cli/test_unpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import stat

import pytest

from wheel.cli.unpack import unpack
from wheel.wheelfile import WheelFile

Expand Down
1 change: 0 additions & 1 deletion tests/test_bdist_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import pytest
import setuptools

from wheel.bdist_wheel import (
bdist_wheel,
get_abi_tag,
Expand Down
1 change: 0 additions & 1 deletion tests/test_macosx_libfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import sysconfig

import pytest

from wheel.bdist_wheel import get_platform
from wheel.macosx_libfile import extract_macosx_min_system_version

Expand Down
1 change: 0 additions & 1 deletion tests/test_wheelfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from zipfile import ZIP_DEFLATED, ZipFile

import pytest

from wheel.cli import WheelError
from wheel.wheelfile import WheelFile

Expand Down

0 comments on commit bd8ab85

Please sign in to comment.