Skip to content

Commit

Permalink
addresses PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielBarberini committed Nov 23, 2024
1 parent 0b79762 commit dcb54b8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
format: black flake8 pylint ruff
format: black ruff
lint: flake8 pylint

black:
black ./lib || true
Expand All @@ -10,7 +11,7 @@ flake8:

pylint:
pylint ./lib || true
pylint --disable=E0401,W0621,R0913,R0917 ./tests || true
pylint ./tests || true

ruff:
ruff check --fix ./lib || true
Expand Down
8 changes: 4 additions & 4 deletions lib/models/aerosurfaces.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from enum import Enum
from typing import Optional, Tuple, List, Union
from pydantic import BaseModel
from pydantic import BaseModel, Field


class Parachute(BaseModel):
name: str
cd_s: float
sampling_rate: int
lag: float
cd_s: float = Field(..., ge=0, description="Must be non-negative")
sampling_rate: float = Field(..., gt=0, description="Must be positive")
lag: float = Field(..., ge=0, description="Must be non-negative")
trigger: Union[str, float]
noise: Tuple[float, float, float]

Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ disable = """
broad-exception-caught,
raise-missing-from,
too-many-instance-attributes,
redefined-outer-name,
import-error,
too-many-arguments,
redefined-outer-name,
too-many-positional-arguments,
"""

[tool.ruff]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_routes/test_rockets_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def stub_parachute():
parachute = Parachute(
name='parachute',
cd_s=0,
sampling_rate=0,
sampling_rate=1,
lag=0,
trigger='trigger',
noise=(0, 0, 0),
Expand Down

0 comments on commit dcb54b8

Please sign in to comment.