diff --git a/doc/conf.py b/doc/conf.py index 6ef7904..8705a7d 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -33,4 +33,3 @@ autodoc_member_order = "bysource" autodoc_default_flags = ["members", "special-members"] - diff --git a/src/ua_parser/caching.py b/src/ua_parser/caching.py index 0619235..e115dc4 100644 --- a/src/ua_parser/caching.py +++ b/src/ua_parser/caching.py @@ -6,10 +6,12 @@ __all__ = [ "CachingParser", - - "Cache", "Clearing", "LRU", + "Cache", + "Clearing", + "LRU", ] + class Cache(abc.ABC): """Cache abstract protocol. The :class:`CachingParser` will look values up, merge what was returned (possibly nothing) with what it @@ -17,16 +19,15 @@ class Cache(abc.ABC): A :class:`Cache` is responsible for its own replacement policy. """ + @abc.abstractmethod def __setitem__(self, key: str, value: PartialParseResult): - """Adds or replace ``value`` to the cache at key ``key``. - """ + """Adds or replace ``value`` to the cache at key ``key``.""" ... @abc.abstractmethod def __getitem__(self, key: str) -> Optional[PartialParseResult]: - """Returns a partial result for ``key`` if there is any. - """ + """Returns a partial result for ``key`` if there is any.""" ... diff --git a/src/ua_parser/types.py b/src/ua_parser/types.py index 447b1b4..8d6353b 100644 --- a/src/ua_parser/types.py +++ b/src/ua_parser/types.py @@ -5,11 +5,14 @@ from typing import * __all__ = [ - "UserAgent", "OS", "Device", - - "ParseResult", "DefaultedParseResult", - - "Parser", "Domain", "PartialParseResult", + "UserAgent", + "OS", + "Device", + "ParseResult", + "DefaultedParseResult", + "Parser", + "Domain", + "PartialParseResult", ]