Style: prefer type[Foo | Bar] over type[Foo] | type[Bar] (#10039)

This commit is contained in:
Alex Waygood
2023-04-13 10:34:53 +01:00
committed by GitHub
parent 084f555793
commit 2279886964
5 changed files with 45 additions and 43 deletions

View File

@@ -43,38 +43,40 @@ class KeymapNotify(rq.Event): ...
_EventClass: TypeAlias = dict[
int,
type[KeyPress]
| type[KeyRelease]
| type[ButtonPress]
| type[ButtonRelease]
| type[MotionNotify]
| type[EnterNotify]
| type[LeaveNotify]
| type[FocusIn]
| type[FocusOut]
| type[KeymapNotify]
| type[Expose]
| type[GraphicsExpose]
| type[NoExpose]
| type[VisibilityNotify]
| type[CreateNotify]
| type[DestroyNotify]
| type[UnmapNotify]
| type[MapNotify]
| type[MapRequest]
| type[ReparentNotify]
| type[ConfigureNotify]
| type[ConfigureRequest]
| type[GravityNotify]
| type[ResizeRequest]
| type[CirculateNotify]
| type[CirculateRequest]
| type[PropertyNotify]
| type[SelectionClear]
| type[SelectionRequest]
| type[SelectionNotify]
| type[ColormapNotify]
| type[ClientMessage]
| type[MappingNotify],
type[
KeyPress
| KeyRelease
| ButtonPress
| ButtonRelease
| MotionNotify
| EnterNotify
| LeaveNotify
| FocusIn
| FocusOut
| KeymapNotify
| Expose
| GraphicsExpose
| NoExpose
| VisibilityNotify
| CreateNotify
| DestroyNotify
| UnmapNotify
| MapNotify
| MapRequest
| ReparentNotify
| ConfigureNotify
| ConfigureRequest
| GravityNotify
| ResizeRequest
| CirculateNotify
| CirculateRequest
| PropertyNotify
| SelectionClear
| SelectionRequest
| SelectionNotify
| ColormapNotify
| ClientMessage
| MappingNotify
],
]
event_class: Final[_EventClass]