diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 00000000..6978afa7 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,16 @@ +name: Ruff +on: [push, pull_request] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: 3.11 + - name: Install dependencies + run: | + python -m pip install .[test] + - name: Validate formatting with Ruff + uses: chartboost/ruff-action@v1 diff --git a/lago_python_client/models/plan.py b/lago_python_client/models/plan.py index b344f3ad..2d66c98e 100644 --- a/lago_python_client/models/plan.py +++ b/lago_python_client/models/plan.py @@ -1,11 +1,19 @@ from typing import List, Optional from lago_python_client.base_model import BaseModel -from lago_python_client.models.usage_threshold import UsageThreshold from .charge import Charges, ChargesResponse, ChargesOverrides -from .usage_threshold import UsageThresholds, UsageThresholdsResponse, UsageThresholdsOverrides -from .minimum_commitment import MinimumCommitment, MinimumCommitmentResponse, MinimumCommitmentOverrides +from .usage_threshold import ( + UsageThreshold, + UsageThresholds, + UsageThresholdsResponse, + UsageThresholdsOverrides, +) +from .minimum_commitment import ( + MinimumCommitment, + MinimumCommitmentResponse, + MinimumCommitmentOverrides, +) from .tax import Taxes, TaxesResponse from ..base_model import BaseResponseModel @@ -47,6 +55,7 @@ class PlanResponse(BaseResponseModel): draft_invoices_count: int taxes: Optional[TaxesResponse] + class PlanOverrides(BaseModel): name: Optional[str] invoice_display_name: Optional[str] diff --git a/pyproject.toml b/pyproject.toml index 158a5387..0dd338f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,7 @@ [build-system] -requires = [ - "setuptools>=54", - "wheel" -] +requires = ["setuptools>=54", "wheel"] build-backend = "setuptools.build_meta" + +[tool.ruff.lint] +extend-select = ['E305'] +preview = true