Skip to content

Commit c618d70

Browse files
committed
lint: selectively ignore one-off occurrences
Also demonstrates the correct syntax for different locations: - Python - Markdown - SCSS Signed-off-by: Mike Fiedler <[email protected]>
1 parent 2d0e9fe commit c618d70

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

docs/blog/posts/2024-08-16-safety-and-security-engineer-year-in-review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ with the added benefit of making it easier for others to contribute.
243243
As well as "routine" work - handling inbound reports, analysis, and response.
244244

245245
I also attended some conferences, round tables, and meetings, including
246-
Fastly Altitude 2023, AWS re:Invent 2023, PyCon US 2024, and AWS re:Inforce 2024,
246+
Fastly Altitude 2023, AWS re:Invent 2023, PyCon US 2024, and AWS re:Inforce 2024, <!-- codespell:ignore -->
247247
amongst some.
248248
I've also been getting more involved with the
249249
[OpenSSF](https://openssf.org/)

tests/unit/events/test_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class TestUserAgentInfo:
7676
),
7777
(
7878
(
79-
"Mozilla/5.0 (X11; CrOS x86_64 8172.45.0) AppleWebKit/537.36 "
79+
"Mozilla/5.0 (X11; CrOS x86_64 8172.45.0) AppleWebKit/537.36 " # codespell:ignore # noqa: E501
8080
"(KHTML, like Gecko) Chrome/51.0.2704.64 Safari/537.36"
8181
),
8282
{

tests/unit/forklift/test_metadata.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def test_invalid_classifier(self):
148148
def test_deprecated_classifiers_with_replacement(self, backfill):
149149
data = (
150150
b"Metadata-Version: 2.1\nName: spam\nVersion: 2.0\n"
151-
b"Classifier: Natural Language :: Ukranian\n"
151+
b"Classifier: Natural Language :: Ukranian\n" # codespell:ignore
152152
)
153153

154154
if not backfill:
@@ -157,7 +157,9 @@ def test_deprecated_classifiers_with_replacement(self, backfill):
157157
_assert_invalid_metadata(excinfo.value, "classifier")
158158
else:
159159
meta = metadata.parse(data, backfill=True)
160-
assert meta.classifiers == ["Natural Language :: Ukranian"]
160+
assert meta.classifiers == [
161+
"Natural Language :: Ukranian" # codespell:ignore
162+
]
161163

162164
@pytest.mark.parametrize("backfill", [True, False])
163165
def test_deprecated_classifiers_no_replacement(self, backfill):

warehouse/oidc/services.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def store_jwt_identifier(self, jti: str, expiration: int) -> None:
240240
# released before the token invalidation.
241241
r.set(
242242
f"/warehouse/oidc/{self.publisher}/{jti}",
243-
exat=expiration + 5,
243+
exat=expiration + 5, # codespell:ignore exat
244244
value="", # empty value to lower memory usage
245245
nx=True,
246246
)

warehouse/static/sass/blocks/_project-description.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ $black: #000;
383383
color: $darkest-blue;
384384
}
385385

386-
.nd { /* Name.Decorator */
386+
// stylelint-disable-next-line comment-empty-line-before -- codespell syntax
387+
.nd { /* Name.Decorator */ /* codespell:ignore nd */
387388
color: $mid-grey;
388389
}
389390

0 commit comments

Comments
 (0)