Skip to content

Commit

Permalink
Merge pull request #254 from DimitriPapadopoulos/RUF100
Browse files Browse the repository at this point in the history
Apply ruff rule RUF100
  • Loading branch information
jaraco committed Jun 28, 2024
2 parents c67b200 + df0502f commit e79d244
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion distutils/bcppcompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self, verbose=0, dry_run=0, force=0):

# -- Worker methods ------------------------------------------------

def compile( # noqa: C901
def compile(
self,
sources,
output_dir=None,
Expand Down
2 changes: 1 addition & 1 deletion distutils/command/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Package containing implementation of all the standard Distutils
commands."""

__all__ = [ # noqa: F822
__all__ = [
'build',
'build_py',
'build_ext',
Expand Down
2 changes: 1 addition & 1 deletion distutils/msvccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,6 @@ def set_path_env_var(self, name):
OldMSVCCompiler = MSVCCompiler
# get_build_architecture not really relevant now we support cross-compile
from distutils.msvc9compiler import (
MacroExpander, # noqa: F811
MacroExpander,
MSVCCompiler,
)
2 changes: 1 addition & 1 deletion distutils/tests/test_unixccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def rpath_foo(self):


class TestUnixCCompiler(support.TempdirManager):
@pytest.mark.skipif('platform.system == "Windows"') # noqa: C901
@pytest.mark.skipif('platform.system == "Windows"')
def test_runtime_libdir_option(self): # noqa: C901
# Issue #5900; GitHub Issue #37
#
Expand Down
3 changes: 3 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
extend-select = [
"C901",
"W",

# local
"RUF100",
]
ignore = [
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
Expand Down

0 comments on commit e79d244

Please sign in to comment.