chore: use enum.StrEnum and update ruff revision
This commit is contained in:
parent
c69336a823
commit
f45229ceb2
@ -1,13 +1,13 @@
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.9.10
|
||||
rev: v0.15.6
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [--fix]
|
||||
- id: ruff-format
|
||||
|
||||
- repo: https://github.com/compilerla/conventional-pre-commit
|
||||
rev: v4.1.0
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: conventional-pre-commit
|
||||
stages: [commit-msg]
|
||||
8
Makefile
8
Makefile
@ -17,12 +17,12 @@ test-docker:
|
||||
docker compose -f docker-compose.yml -f docker-compose.test.yml down
|
||||
|
||||
lint:
|
||||
uv run ruff check src/ tests/
|
||||
uv run ruff format --check src/ tests/
|
||||
uv run ruff check src/
|
||||
uv run ruff format --check src/
|
||||
|
||||
lint-fix:
|
||||
uv run ruff check --fix src/ tests/
|
||||
uv run ruff format src/ tests/
|
||||
uv run ruff check --fix src/
|
||||
uv run ruff format src/
|
||||
|
||||
typecheck:
|
||||
uv run mypy src/
|
||||
|
||||
@ -9,7 +9,7 @@ from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
from proxy_pool.db.base import Base, TimestampMixin, UUIDPrimaryKeyMixin
|
||||
|
||||
|
||||
class CreditTxType(str, enum.Enum):
|
||||
class CreditTxType(str, enum.StrEnum):
|
||||
PURCHASE = "purchase"
|
||||
ACQUIRE = "acquire"
|
||||
REFUND = "refund"
|
||||
|
||||
@ -18,20 +18,20 @@ from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
from proxy_pool.db.base import Base, TimestampMixin, UUIDPrimaryKeyMixin
|
||||
|
||||
|
||||
class ProxyProtocol(str, enum.Enum):
|
||||
class ProxyProtocol(str, enum.StrEnum):
|
||||
HTTP = "http"
|
||||
HTTPS = "https"
|
||||
SOCKS4 = "socks4"
|
||||
SOCKS5 = "socks5"
|
||||
|
||||
|
||||
class ProxyStatus(str, enum.Enum):
|
||||
class ProxyStatus(str, enum.StrEnum):
|
||||
UNCHECKED = "unchecked"
|
||||
ACTIVE = "active"
|
||||
DEAD = "dead"
|
||||
|
||||
|
||||
class AnonymityLevel(str, enum.Enum):
|
||||
class AnonymityLevel(str, enum.StrEnum):
|
||||
TRANSPARENT = "transparent"
|
||||
ANONYMOUS = "anonymous"
|
||||
ELITE = "elite"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user