Skip to content

Commit dcb54b8

Browse files
addresses PR review
1 parent 0b79762 commit dcb54b8

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
format: black flake8 pylint ruff
1+
format: black ruff
2+
lint: flake8 pylint
23

34
black:
45
black ./lib || true
@@ -10,7 +11,7 @@ flake8:
1011

1112
pylint:
1213
pylint ./lib || true
13-
pylint --disable=E0401,W0621,R0913,R0917 ./tests || true
14+
pylint ./tests || true
1415

1516
ruff:
1617
ruff check --fix ./lib || true

lib/models/aerosurfaces.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
from enum import Enum
22
from typing import Optional, Tuple, List, Union
3-
from pydantic import BaseModel
3+
from pydantic import BaseModel, Field
44

55

66
class Parachute(BaseModel):
77
name: str
8-
cd_s: float
9-
sampling_rate: int
10-
lag: float
8+
cd_s: float = Field(..., ge=0, description="Must be non-negative")
9+
sampling_rate: float = Field(..., gt=0, description="Must be positive")
10+
lag: float = Field(..., ge=0, description="Must be non-negative")
1111
trigger: Union[str, float]
1212
noise: Tuple[float, float, float]
1313

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ disable = """
4343
broad-exception-caught,
4444
raise-missing-from,
4545
too-many-instance-attributes,
46+
redefined-outer-name,
47+
import-error,
48+
too-many-arguments,
49+
redefined-outer-name,
50+
too-many-positional-arguments,
4651
"""
4752

4853
[tool.ruff]

tests/test_routes/test_rockets_route.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def stub_parachute():
162162
parachute = Parachute(
163163
name='parachute',
164164
cd_s=0,
165-
sampling_rate=0,
165+
sampling_rate=1,
166166
lag=0,
167167
trigger='trigger',
168168
noise=(0, 0, 0),

0 commit comments

Comments
 (0)