Skip to content

Commit 8918257

Browse files
MAINT: Apply ruff/pygrep-hooks rule PGH004
PGH004 Use a colon when specifying `noqa` rule codes
1 parent 718d5a8 commit 8918257

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

asv/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from importlib_metadata import version as get_version
44

5-
from asv import plugin_manager # noqa F401 Needed to load the plugins
5+
from asv import plugin_manager # noqa: F401 Needed to load the plugins
66

77
__version__ = get_version("asv")
88

asv/plugins/virtualenv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def __init__(self, conf, python, requirements, tagged_env_vars):
4747
tagged_env_vars)
4848

4949
try:
50-
import virtualenv # noqa F401 unused, but required to test whether virtualenv is installed or not
50+
import virtualenv # noqa: F401 unused, but required to test whether virtualenv is installed or not
5151
except ImportError:
5252
raise environment.EnvironmentUnavailable(
5353
"virtualenv package not installed")

test/benchmark/time_secondary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
if sys.version_info[0] < 3:
1515
import commands
1616
try:
17-
import commands.quickstart # noqa F401 unused import
17+
import commands.quickstart # noqa: F401 unused import
1818
assert False
1919
except ImportError:
2020
# OK
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22

3-
dummy_value = {dummy_value} # noqa F821 This is a template that will be rendered to valid Python
3+
dummy_value = {dummy_value} # noqa: F821 This is a template that will be rendered to valid Python

test/test_repo_template/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This file is a template, and will be rendered before executed.
66
# So the double curly brackets will become single after rendering, and
77
# when executed, this will work as expected
8-
content = 'env = {{}}\n'.format(repr(dict(os.environ))) # noqa W291 see above comment
8+
content = 'env = {{}}\n'.format(repr(dict(os.environ))) # noqa: W291 see above comment
99
with open('asv_test_repo/build_time_env.py', 'w') as f:
1010
f.write(content)
1111

test/test_results.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def test_get_result_hash_from_prefix(tmpdir):
155155
assert 'one of multiple commits' in str(excinfo.value)
156156

157157

158-
def test_backward_compat_load(example_results): # noqa F811 redefinition of the imported fixture,it can be removed when the fixture is moved to conftest.py file and the import deleted
158+
def test_backward_compat_load(example_results): # noqa: F811 redefinition of the imported fixture,it can be removed when the fixture is moved to conftest.py file and the import deleted
159159
resultsdir = example_results
160160
filename = join('cheetah', '624da0aa-py2.7-Cython-numpy1.8.json')
161161

@@ -204,7 +204,7 @@ def test_json_timestamp(tmpdir):
204204
assert values['duration'] == duration
205205

206206

207-
def test_iter_results(capsys, tmpdir, example_results): # noqa F811 noqa F811 redefinition of the imported fixture,it can be removed when the fixture is moved to conftest.py file and the import deleted
207+
def test_iter_results(capsys, tmpdir, example_results): # noqa: F811 noqa F811 redefinition of the imported fixture,it can be removed when the fixture is moved to conftest.py file and the import deleted
208208
dst = os.path.join(str(tmpdir), 'example_results')
209209
shutil.copytree(example_results, dst)
210210

test/tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ def _check_conda():
7272

7373

7474
try:
75-
import virtualenv # noqa F401 checking if installed
75+
import virtualenv # noqa: F401 checking if installed
7676
HAS_VIRTUALENV = True
7777
except ImportError:
7878
HAS_VIRTUALENV = False
7979

8080

8181
try:
82-
import rattler # noqa F401 checking if installed
82+
import rattler # noqa: F401 checking if installed
8383
HAS_RATTLER = True
8484
except ImportError:
8585
HAS_RATTLER = False

0 commit comments

Comments
 (0)