Skip to content

Commit a2745c0

Browse files
authored
fix: resolve linting errors after dependency updates (#634)
1 parent f2f1396 commit a2745c0

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,10 @@ jobs:
144144

145145
- name: Check with pip-audit
146146
# until https://github.com/astral-sh/ruff/issues/8277
147+
# TODO: Re-enable pip vulnerability checking when pip 25.3 is released (currently disabled for pip 25.2 due to GHSA-4xh5-x5gv-qwph)
148+
# https://github.com/pypa/pip/issues/13607
147149
run:
148-
pdm run pip-audit --progress-spinner off --skip-editable --verbose
150+
pdm run pip-audit --progress-spinner off --skip-editable --verbose --ignore-vuln GHSA-4xh5-x5gv-qwph
149151

150152

151153
- name: Check with ruff

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ ignore = [
226226
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
227227
"ASYNC210", # TODO Async functions should not call blocking HTTP methods
228228
"ASYNC230", # TODO Async functions should not open files with blocking methods like `open`
229+
"ASYNC240", # TODO Async functions should not use os.path methods, use trio.Path or anyio.path
230+
"ASYNC250", # TODO Blocking call to input() in async context
229231
"COM812", # Trailing comma missing
230232
"D1", # Missing docstring in ...
231233
"D200", # One-line docstring should fit on one line
@@ -252,6 +254,7 @@ ignore = [
252254
"PERF203", # `try`-`except` within a loop incurs performance overhead
253255
"RET504", # Unnecessary assignment to `...` before `return` statement
254256
"PLR6301", # Method `...` could be a function, class method, or static method
257+
"PLR0913", # Too many arguments in function definition (needed to match parent signature)
255258
"PYI041", # Use `float` instead of `int | float`
256259
"SIM102", # Use a single `if` statement instead of nested `if` statements
257260
"SIM105", # Use `contextlib.suppress(TimeoutError)` instead of `try`-`except`-`pass`

src/kleinanzeigen_bot/utils/pydantics.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: AGPL-3.0-or-later
33
# SPDX-ArtifactOfProjectHomePage: https://github.com/Second-Hand-Friends/kleinanzeigen-bot/
44
from gettext import gettext as _
5-
from typing import Any, cast
5+
from typing import Any, Literal, cast
66

77
from pydantic import BaseModel, ValidationError
88
from pydantic_core import InitErrorDetails
@@ -23,6 +23,7 @@ def model_validate(
2323
obj:Any,
2424
*,
2525
strict:bool | None = None,
26+
extra:Literal["allow", "ignore", "forbid"] | None = None,
2627
from_attributes:bool | None = None,
2728
context:Any | None = None,
2829
by_alias:bool | None = None,
@@ -36,6 +37,7 @@ def model_validate(
3637
return super().model_validate(
3738
obj,
3839
strict = strict,
40+
extra = extra,
3941
from_attributes = from_attributes,
4042
context = context,
4143
by_alias = by_alias,

0 commit comments

Comments
 (0)