Skip to content

Commit f06882e

Browse files
authored
Added Metadata to public API (#363)
* Added Metadata to _serializers.py's __all__ * Added RUF022 to sort __all__ * Created a CHANGELOG entry
1 parent b85f07e commit f06882e

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## development
44

5+
- Added `Metadata` to public API. (#363)
56
- Fix race condition in FileStorage initialization. (#353)
67

78
## 0.1.3 (1st July, 2025)

hishel/_async/_storages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
__all__ = (
3737
"AsyncBaseStorage",
3838
"AsyncFileStorage",
39-
"AsyncRedisStorage",
40-
"AsyncSQLiteStorage",
4139
"AsyncInMemoryStorage",
40+
"AsyncRedisStorage",
4241
"AsyncS3Storage",
42+
"AsyncSQLiteStorage",
4343
)
4444

4545
StoredResponse: TypeAlias = tp.Tuple[Response, Request, Metadata]

hishel/_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
HEURISTICALLY_CACHEABLE_STATUS_CODES = (200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, 501)
2121
HTTP_METHODS = ["GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]
2222

23-
__all__ = ("Controller", "HEURISTICALLY_CACHEABLE_STATUS_CODES")
23+
__all__ = ("HEURISTICALLY_CACHEABLE_STATUS_CODES", "Controller")
2424

2525

2626
def get_updated_headers(

hishel/_serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
KNOWN_RESPONSE_EXTENSIONS = ("http_version", "reason_phrase")
1818
KNOWN_REQUEST_EXTENSIONS = ("timeout", "sni_hostname")
1919

20-
__all__ = ("PickleSerializer", "JSONSerializer", "YAMLSerializer", "BaseSerializer", "clone_model")
20+
__all__ = ("BaseSerializer", "JSONSerializer", "Metadata", "PickleSerializer", "YAMLSerializer", "clone_model")
2121

2222
T = tp.TypeVar("T", Request, Response)
2323

hishel/_sync/_storages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
__all__ = (
3737
"BaseStorage",
3838
"FileStorage",
39-
"RedisStorage",
40-
"SQLiteStorage",
4139
"InMemoryStorage",
40+
"RedisStorage",
4241
"S3Storage",
42+
"SQLiteStorage",
4343
)
4444

4545
StoredResponse: TypeAlias = tp.Tuple[Response, Request, Metadata]

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ select = [
117117
"E",
118118
"F",
119119
"W",
120-
"I"
120+
"I",
121+
"RUF022"
121122
]
122123

123124
[tool.ruff.lint.isort]

0 commit comments

Comments
 (0)