Skip to content

Commit 980bb47

Browse files
Remove - uses: crate-ci/typos/@v1 because of false positives
We have a `NAMESPACEE` field in `parserfns` (`{{{NAMESPACEE}}}`, it's unimplement) which pisses off the linter for some reason.
1 parent db2859e commit 980bb47

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/lint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ jobs:
2424
- run: python -m mypy -p wikitextprocessor
2525
- run: python -m ruff check .
2626
- run: python -m ruff format --diff .
27-
- uses: crate-ci/typos@v1

src/wikitextprocessor/parserfns.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,9 +1108,11 @@ def month_num_days(ctx: "Wtp", t: datetime) -> int:
11081108
] = {
11091109
"Y": "%Y",
11101110
"y": "%y",
1111-
"L": lambda ctx, t: 1
1112-
if (t.year % 4 == 0 and (t.year % 100 != 0 or t.year % 400 == 0))
1113-
else 0,
1111+
"L": lambda ctx, t: (
1112+
1
1113+
if (t.year % 4 == 0 and (t.year % 100 != 0 or t.year % 400 == 0))
1114+
else 0
1115+
),
11141116
"o": "%G",
11151117
"n": lambda ctx, t: t.month,
11161118
"m": "%m",
@@ -1120,8 +1122,8 @@ def month_num_days(ctx: "Wtp", t: datetime) -> int:
11201122
"j": lambda ctx, t: t.day,
11211123
"d": "%d",
11221124
"z": lambda ctx, t: (
1123-
t - datetime(year=t.year, month=1, day=1, tzinfo=t.tzinfo)
1124-
).days,
1125+
(t - datetime(year=t.year, month=1, day=1, tzinfo=t.tzinfo)).days
1126+
),
11251127
"W": "%V",
11261128
"N": "%u",
11271129
"w": "%w",

0 commit comments

Comments
 (0)