Skip to content

Commit

Permalink
Don't use Literal type - causes problems with dacite
Browse files Browse the repository at this point in the history
  • Loading branch information
7x11x13 committed Jun 22, 2024
1 parent 5efda42 commit c275fa4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def readme():
"dacite",
"python-dateutil>=2.8.2",
"requests",
"typing-extensions; python_version < '3.8'",
],
extras_require={"test": ["coveralls", "pytest", "pytest-dotenv"], "docs": ["pdoc"]},
classifiers=[
Expand Down
9 changes: 2 additions & 7 deletions soundcloud/resource/graphql.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
from dataclasses import dataclass
from typing import List, Optional

try:
from typing import Literal
except ImportError:
from typing_extensions import Literal

from soundcloud.resource.base import BaseData
from soundcloud.resource.comment import BasicComment

InteractionTypeValue = Literal["sc:interactiontypevalue:like"]
InteractionTypeValue = str


@dataclass
Expand All @@ -23,7 +18,7 @@ class UserInteraction(BaseData):
targetUrn: Optional[str]
userInteraction: Optional[InteractionTypeValue]
interactionCounts: Optional[List[InteractionCount]]
interactionTypeUrn: Optional[Literal["sc:interactiontype:reaction"]]
interactionTypeUrn: Optional[str]


@dataclass
Expand Down

0 comments on commit c275fa4

Please sign in to comment.