Skip to content

Commit 4244632

Browse files
committed
lint: Enable pygrep-hooks
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
1 parent 460424a commit 4244632

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ select = [
9494
"ISC", # flake8-implicit-str-concat
9595
"N", # pep8-naming
9696
"PL", # pylint
97+
"PGH", # pygrep-hooks
9798
"PIE", # flake8-pie
9899
"PYI", # flake8-pyi
99100
"RET", # flake8-return

tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ def test_fail_envelope_deserialization(self) -> None:
11751175

11761176
def test_fail_payload_serialization(self) -> None:
11771177
with self.assertRaises(SerializationError):
1178-
SimpleEnvelope.from_signed("foo") # type: ignore
1178+
SimpleEnvelope.from_signed("foo") # type: ignore[type-var]
11791179

11801180
def test_fail_payload_deserialization(self) -> None:
11811181
payloads = [b"[", b'{"_type": "foo"}']

tests/test_metadata_eq_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def test_md_eq_special_signatures_tests(self) -> None:
132132
self.assertEqual(md, md_2)
133133

134134
# Metadata objects with different signatures types are not equal.
135-
md_2.signatures = "" # type: ignore
135+
md_2.signatures = "" # type: ignore[assignment]
136136
self.assertNotEqual(md, md_2)
137137

138138
def test_delegations_eq_roles_reversed_order(self) -> None:

verify_release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ from tempfile import TemporaryDirectory
1919
from typing import Optional
2020

2121
try:
22-
import build as _ # type: ignore # noqa: F401
22+
import build as _ # type: ignore[import-not-found] # noqa: F401
2323
import requests
2424
except ImportError:
2525
print("Error: verify_release requires modules 'requests' and 'build':")

0 commit comments

Comments
 (0)