Skip to content

Commit

Permalink
style: change minimum python versoin in Ruff
Browse files Browse the repository at this point in the history
Ruff does not support multiple target versions; it only supports the minimum versions. Since we want to support Python 3.11 in CI, it is better to change the target version.
  • Loading branch information
lucasgomide authored and joaodaher committed Jun 21, 2024
1 parent 4986355 commit 1937276
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
15 changes: 5 additions & 10 deletions drf_kit/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,17 @@ def __init__(self, model_klass, body, integrity_error):
super().__init__(message=message, code=self.status_code)

@abc.abstractmethod
def build_message(self) -> str:
...
def build_message(self) -> str: ... # fmt: skip

@abc.abstractmethod
def _parse_psql(self):
...
def _parse_psql(self): ... # fmt: skip

@abc.abstractmethod
def _parse_sqlite(self):
...
def _parse_sqlite(self): ... # fmt: skip

@classmethod
@abc.abstractmethod
def verify(cls, integrity_error: IntegrityError) -> bool:
...
def verify(cls, integrity_error: IntegrityError) -> bool: ... # fmt: skip

@property
def response(self):
Expand Down Expand Up @@ -194,8 +190,7 @@ def _clean(v):
values.append(value)
return keys, values, constraint_name

def _parse_sqlite(self):
...
def _parse_sqlite(self): ...

@classmethod
def verify(cls, integrity_error: IntegrityError) -> bool:
Expand Down
3 changes: 1 addition & 2 deletions drf_kit/managers/soft_delete_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,4 @@ class SoftDeleteOrderedManager(SoftDeleteManager):
queryset_class = SoftDeleteOrderedQueryset


class SoftDeleteAvailabilityManager(AvailabilityManager, SoftDeleteManager):
...
class SoftDeleteAvailabilityManager(AvailabilityManager, SoftDeleteManager): ... # fmt: skip
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pytest-random-order = "*"

[tool.ruff]
line-length = 120
target-version = "py312"
target-version = "py311"

[tool.ruff.lint]
select = ["RUF", "I", "PL", "F", "COM", "UP", "DJ", "T10", "T20", "DTZ", "SIM", "TID", "PTH", "ERA", "TRY"]
Expand Down

0 comments on commit 1937276

Please sign in to comment.