Skip to content
Closed
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
25 changes: 4 additions & 21 deletions py/envoy.base.utils/envoy/base/utils/typing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import pathlib
from typing import TypedDict
from typing import Any, TypedDict

from packaging import version as _version

Expand Down Expand Up @@ -31,30 +31,13 @@ class BaseChangelogDict(TypedDict):
date: str


class ChangelogSourceDict(BaseChangelogDict, total=False):
# This should match envoy:changelogs/sections.yaml
changes: SourceChangeList | None
behavior_changes: SourceChangeList | None
minor_behavior_changes: SourceChangeList | None
bug_fixes: SourceChangeList | None
removed_config_or_runtime: SourceChangeList | None
new_features: SourceChangeList | None
deprecated: SourceChangeList | None
ChangelogSourceDict = dict[str, Any]


class ChangelogChangeSectionsDict(TypedDict, total=False):
# This should match envoy:changelogs/sections.yaml
changes: ChangeList | None
behavior_changes: ChangeList | None
minor_behavior_changes: ChangeList | None
bug_fixes: ChangeList | None
removed_config_or_runtime: ChangeList | None
new_features: ChangeList | None
deprecated: ChangeList | None
ChangelogChangeSectionsDict = dict[str, ChangeList]


class ChangelogDict(BaseChangelogDict, ChangelogChangeSectionsDict):
pass
ChangelogDict = dict[str, Any]


ChangelogPathsDict = dict[_version.Version, pathlib.Path]
Expand Down