Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: debug-statements
Expand All @@ -18,20 +18,20 @@ repos:
- id: end-of-file-fixer

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
rev: v0.15.6
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.43.0
rev: v0.48.0
hooks:
- id: markdownlint-fix
args: [--config=pyproject.toml, --configPointer=/tool/markdownlint]

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
rev: v2.16.0
hooks:
- id: pretty-format-toml
args: [--autofix]
Expand Down
16 changes: 9 additions & 7 deletions repid/connections/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
TypeVar,
)

from typing_extensions import Self

from repid.config import Config
from repid.message import MessageCategory
from repid.middlewares import middleware_wrapper
Expand All @@ -26,10 +28,10 @@ class _WrappedABC(ABC): # noqa: B024
__WRAPPED_METHODS__: tuple[str, ...] = ()

def __new__(
cls: type[WrappedABCSelf],
*args: Any, # noqa: ARG003
**kwargs: Any, # noqa: ARG003
) -> WrappedABCSelf:
cls,
*args: Any,
**kwargs: Any,
) -> Self:
inst = super().__new__(cls)

for method in inst.__WRAPPED_METHODS__:
Expand Down Expand Up @@ -184,7 +186,7 @@ async def queue_delete(self, queue_name: str) -> None:

def __new__( # noqa: PYI034
cls: type[MessageBrokerT],
*args: Any, # noqa: ARG003
*args: Any,
**kwargs: Any, # noqa: ARG003s
) -> MessageBrokerT:
cls.ROUTING_KEY_CLASS = deepcopy(Config.ROUTING_KEY)
Expand Down Expand Up @@ -222,8 +224,8 @@ async def delete_bucket(self, id_: str) -> None:

def __new__( # noqa: PYI034
cls: type[BucketBrokerT],
*args: Any, # noqa: ARG003
**kwargs: Any, # noqa: ARG003
*args: Any,
**kwargs: Any,
) -> BucketBrokerT:
cls.BUCKET_CLASS = deepcopy(Config.BUCKET)

Expand Down
2 changes: 1 addition & 1 deletion repid/connections/redis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def full_message_name_from_short(short_name: str, full_queue_name: str) -> str:


def get_queue_marker(full_queue_name: str) -> str:
return full_queue_name.split(":")[-1]
return full_queue_name.rsplit(":", maxsplit=1)[-1]


def parse_short_message_name(short_name: str) -> tuple[str, str]:
Expand Down
2 changes: 1 addition & 1 deletion repid/testing/modifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, parent: MessageBrokerT | BucketBrokerT) -> None:

def consumer_class_wrapper(self, class_: type[ConsumerT]) -> type[ConsumerT]:
class ConsumerWrapper(class_): # type: ignore[valid-type,misc]
def __new__(cls, *args: Any, **kwargs: Any) -> Any: # noqa: ARG003
def __new__(cls, *args: Any, **kwargs: Any) -> Any:
inst = super().__new__(cls)

for method in inst.__WRAPPED_METHODS__:
Expand Down
Loading