Fix dunder-method positional-only parameter discrepancies in third-party stubs (#14529)

This commit is contained in:
Brian Schubert authored and GitHub committed 2025-08-08 12:12:44 +02:00
1 parent 2e3203fdff
commit 11907e2825
11 files changed
+113 -99

No files matched your search

+18 -6
View File
@@ -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"