Skip to content

Commit

Permalink
FIX: update Ruff and fix linter errors 🚨
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenein committed May 27, 2024
1 parent 96feed5 commit 7df7fff
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
13 changes: 6 additions & 7 deletions combadge/support/http/abc/containers.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
"""Mixins for HTTP-related request and response classes."""

from abc import ABC
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Tuple


@dataclass
class ContainsHeaders(ABC):
class ContainsHeaders:
"""HTTP request headers."""

headers: List[Tuple[str, Any]] = field(default_factory=list)


@dataclass
class ContainsUrlPath(ABC):
class ContainsUrlPath:
"""Request URL path."""

url_path: Optional[str] = None
Expand All @@ -26,7 +25,7 @@ def get_url_path(self) -> str:


@dataclass
class ContainsMethod(ABC):
class ContainsMethod:
"""HTTP request method."""

method: Optional[str] = None
Expand All @@ -39,14 +38,14 @@ def get_method(self) -> str:


@dataclass
class ContainsQueryParams(ABC):
class ContainsQueryParams:
"""HTTP request query parameters."""

query_params: List[Tuple[str, Any]] = field(default_factory=list)


@dataclass
class ContainsFormData(ABC):
class ContainsFormData:
"""
HTTP request [form data][1].
Expand All @@ -64,7 +63,7 @@ def append_form_field(self, name: str, value: Any) -> None: # noqa: D102


@dataclass
class ContainsPayload(ABC):
class ContainsPayload:
"""SOAP request payload."""

payload: Optional[Any] = None
3 changes: 1 addition & 2 deletions combadge/support/soap/abc.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from abc import ABC
from dataclasses import dataclass
from typing import Optional

from combadge._helpers.dataclasses import SLOTS


@dataclass(**SLOTS)
class ContainsOperationName(ABC):
class ContainsOperationName:
"""SOAP operation name."""

operation_name: Optional[str] = None
Expand Down
40 changes: 20 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ warn_redundant_casts = true
[tool.ruff]
line-length = 120
target-version = "py38"

[tool.ruff.lint]
select = [
"A",
"ANN",
Expand Down Expand Up @@ -85,10 +87,10 @@ ignore = [
]
unfixable = ["B"]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D101", "D102", "D106"]

[tool.ruff.flake8-quotes]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"

[tool.pytest.ini_options]
Expand Down Expand Up @@ -132,7 +134,7 @@ mypy = "1.9.0"
pytest = "8.1.1"
pytest-cov = "5.0.0"
types-requests = "^2.28.11.8"
ruff = "0.3.5"
ruff = "0.4.5"
pytest-recording = "0.13.1"
pytest-asyncio = "0.23.6"
urllib3 = "1.26.18"
Expand Down

0 comments on commit 7df7fff

Please sign in to comment.