jack: Fix MidiPort properties (#7730)

Fixes #7729 

26b648a361/src/jack.py (L1950)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Jelle Zijlstra
2022-04-27 22:28:17 -06:00
committed by GitHub
parent 1f2a970b94
commit 1deb9cb806

View File

@@ -1,7 +1,7 @@
from _typeshed import Self
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
from typing import Any, overload
from typing_extensions import TypeAlias
from typing_extensions import Literal, TypeAlias
_NDArray: TypeAlias = Any # FIXME: no typings for numpy arrays
@@ -180,8 +180,10 @@ class Port:
def request_monitor(self, onoff: bool) -> None: ...
class MidiPort(Port):
is_audio: bool = ...
is_midi: bool = ...
@property
def is_audio(self) -> Literal[False]: ...
@property
def is_midi(self) -> Literal[True]: ...
class OwnPort(Port):
@property