Skip to content

Commit

Permalink
slightly improve typing
Browse files Browse the repository at this point in the history
  • Loading branch information
aleneum committed May 7, 2024
1 parent 99d69d2 commit 5e03bc2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
- '_anchor' suffix has been removed for (py)graphviz cluster node anchors
- local testing switched from [tox](https://github.com/tox-dev/tox) to [nox](https://github.com/wntrblm/nox)
- PR #633: Remove surrounding whitespace from docstrings (thanks @artofhuman)
- Typing:
+ Made machine property mandatory in (Nested)EventData
+ Transition.dest may be None

## 0.9.0 (September 2022)

Expand Down
4 changes: 2 additions & 2 deletions transitions/core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Transition:
dynamic_methods: List[str]
condition_cls: Type[Condition]
source: str
dest: str
dest: Optional[str]
prepare: CallbackList
before: CallbackList
after: CallbackList
Expand All @@ -70,7 +70,7 @@ TransitionConfig = Union[Sequence[Union[str, Any]], Dict[str, Any], Transition]
class EventData:
state: Optional[State]
event: Optional[Event]
machine: Optional[Machine]
machine: Machine
model: object
args: Iterable[Any]
kwargs: Dict[str, Any]
Expand Down
2 changes: 1 addition & 1 deletion transitions/extensions/nesting.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class NestedEvent(Event):
class NestedEventData(EventData):
state: Optional[NestedState]
event: Optional[NestedEvent]
machine: Optional[HierarchicalMachine]
machine: HierarchicalMachine
transition: Optional[NestedTransition]
source_name: Optional[str]
source_path: Optional[List[str]]
Expand Down

0 comments on commit 5e03bc2

Please sign in to comment.