Skip to content

Commit 0367c3b

Browse files
committed
ruff 0.3 formatting changes
1 parent c0abcbb commit 0367c3b

4 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/ua_parser/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
This way importing anything but the top-level package should not be
1717
necessary unless you want to *implement* a parser.
1818
"""
19+
1920
from __future__ import annotations
2021

2122
__all__ = [

src/ua_parser/core.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,11 @@ def complete(self) -> ParseResult:
158158

159159
class Matcher(abc.ABC, Generic[T]):
160160
@abc.abstractmethod
161-
def __call__(self, ua: str) -> Optional[T]:
162-
...
161+
def __call__(self, ua: str) -> Optional[T]: ...
163162

164163
@property
165164
@abc.abstractmethod
166-
def pattern(self) -> str:
167-
...
165+
def pattern(self) -> str: ...
168166

169167
@property
170168
def flags(self) -> int:

src/ua_parser/loaders.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@ def load_lazy(d: MatchersData) -> Matchers:
167167

168168

169169
class FileLoader(Protocol):
170-
def __call__(self, path: PathOrFile, loader: DataLoader = load_data) -> Matchers:
171-
...
170+
def __call__(
171+
self, path: PathOrFile, loader: DataLoader = load_data
172+
) -> Matchers: ...
172173

173174

174175
def load_json(f: PathOrFile, loader: DataLoader = load_data) -> Matchers:

tests/test_core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Tests UAP-Python using the UAP-core test suite
2-
"""
1+
"""Tests UAP-Python using the UAP-core test suite"""
32

43
import dataclasses
54
import logging

0 commit comments

Comments
 (0)