mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-22 13:07:04 +08:00
Fix dunder-method positional-only parameter discrepancies in third-party stubs (#14529)
This commit is contained in:
1 parent
2e3203fdff
commit
11907e2825
11 files changed
+113
-99
No files matched your search
@@ -1,7 +1,19 @@
|
||||
from enum import Enum
|
||||
import sys
|
||||
|
||||
class ExchangeType(Enum):
|
||||
direct = "direct"
|
||||
fanout = "fanout"
|
||||
headers = "headers"
|
||||
topic = "topic"
|
||||
if sys.version_info >= (3, 11):
|
||||
from enum import StrEnum
|
||||
|
||||
class ExchangeType(StrEnum):
|
||||
direct = "direct"
|
||||
fanout = "fanout"
|
||||
headers = "headers"
|
||||
topic = "topic"
|
||||
|
||||
else:
|
||||
from enum import Enum
|
||||
|
||||
class ExchangeType(str, Enum):
|
||||
direct = "direct"
|
||||
fanout = "fanout"
|
||||
headers = "headers"
|
||||
topic = "topic"
|
||||
Reference in new issue
Block a user