Skip to content

Commit

Permalink
ruff 0.3 formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
masklinn committed Mar 1, 2024
1 parent c0abcbb commit cd28ee7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/ua_parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
This way importing anything but the top-level package should not be
necessary unless you want to *implement* a parser.
"""

from __future__ import annotations

__all__ = [
Expand Down
6 changes: 2 additions & 4 deletions src/ua_parser/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,11 @@ def complete(self) -> ParseResult:

class Matcher(abc.ABC, Generic[T]):
@abc.abstractmethod
def __call__(self, ua: str) -> Optional[T]:
...
def __call__(self, ua: str) -> Optional[T]: ...

@property
@abc.abstractmethod
def pattern(self) -> str:
...
def pattern(self) -> str: ...

@property
def flags(self) -> int:
Expand Down
5 changes: 3 additions & 2 deletions src/ua_parser/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ def load_lazy(d: MatchersData) -> Matchers:


class FileLoader(Protocol):
def __call__(self, path: PathOrFile, loader: DataLoader = load_data) -> Matchers:
...
def __call__(
self, path: PathOrFile, loader: DataLoader = load_data
) -> Matchers: ...


def load_json(f: PathOrFile, loader: DataLoader = load_data) -> Matchers:
Expand Down
3 changes: 1 addition & 2 deletions tests/test_core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Tests UAP-Python using the UAP-core test suite
"""
"""Tests UAP-Python using the UAP-core test suite"""

import dataclasses
import logging
Expand Down

0 comments on commit cd28ee7

Please sign in to comment.