Skip to content

Commit 09f2ce5

Browse files
committed
add pylint ignores for pydantic conventions
Signed-off-by: Bradley Reynolds <[email protected]>
1 parent 1219f3c commit 09f2ce5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ addopts = "tests -r a -v --doctest-modules src"
5858
max-line-length = 120
5959

6060
[tool.pylint.messages_control]
61-
disable = "R0903"
61+
disable = "C0103,R0903,E0213"
6262
# justifications:
63+
# C0103 (invalid-name) - pydantic
6364
# R0903 (too-few-public-methods) - models
65+
# E0213 (no-self-argument) - pydantic

src/api/modules/generators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ class NumbersConfig(BaseModel):
4646
quantity: int | None = Field(gt=0, default=1)
4747

4848
@validator("upper_bound")
49-
def upper_bound_must_be_greater_than_lower_bound(cls, v, values, **kwargs):
49+
def upper_bound_must_be_greater_than_lower_bound(cls, v, values):
50+
"""Confirm upper bound is greater than lower bound"""
5051
if "lower_bound" in values and v < values["lower_bound"]:
5152
raise ValueError("upper bound must be greater than lower bound")
5253
return v

0 commit comments

Comments
 (0)