Skip to content

Commit dceca5c

Browse files
Apply ruff/pygrep-hooks rule PGH004
PGH004 Use specific rule codes when using `noqa`
1 parent ed2ba5a commit dceca5c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/pip/_internal/utils/unpacking.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
SUPPORTED_EXTENSIONS = ZIP_EXTENSIONS + TAR_EXTENSIONS
2727

2828
try:
29-
import bz2 # noqa
29+
import bz2 # noqa: F401
3030

3131
SUPPORTED_EXTENSIONS += BZ2_EXTENSIONS
3232
except ImportError:
3333
logger.debug("bz2 module is not available")
3434

3535
try:
3636
# Only for Python 3.3+
37-
import lzma # noqa
37+
import lzma # noqa: F401
3838

3939
SUPPORTED_EXTENSIONS += XZ_EXTENSIONS
4040
except ImportError:

tests/functional/test_install.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1863,7 +1863,7 @@ def test_install_editable_with_wrong_egg_name(
18631863

18641864
def test_install_tar_xz(script: PipTestEnvironment, data: TestData) -> None:
18651865
try:
1866-
import lzma # noqa
1866+
import lzma # noqa: F401
18671867
except ImportError:
18681868
pytest.skip("No lzma support")
18691869
res = script.pip("install", data.packages / "singlemodule-0.0.1.tar.xz")
@@ -1872,7 +1872,7 @@ def test_install_tar_xz(script: PipTestEnvironment, data: TestData) -> None:
18721872

18731873
def test_install_tar_lzma(script: PipTestEnvironment, data: TestData) -> None:
18741874
try:
1875-
import lzma # noqa
1875+
import lzma # noqa: F401
18761876
except ImportError:
18771877
pytest.skip("No lzma support")
18781878
res = script.pip("install", data.packages / "singlemodule-0.0.1.tar.lzma")

0 commit comments

Comments
 (0)