Remove redundant copy operation
This commit is contained in:
1 parent
23a8681e71
commit
72b80e18d8
1 file changed
+3
-3
+3
-3
@@ -4,7 +4,6 @@ import re
|
|||||||
import json
|
import json
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
from copy import copy
|
|
||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
from typing import Any, Optional, TYPE_CHECKING
|
from typing import Any, Optional, TYPE_CHECKING
|
||||||
@@ -131,8 +130,9 @@ class Channel:
|
|||||||
return match.group(1)
|
return match.group(1)
|
||||||
|
|
||||||
async def get_stream(self) -> Optional[Stream]:
|
async def get_stream(self) -> Optional[Stream]:
|
||||||
op = copy(GQL_OPERATIONS["GetStreamInfo"].with_variables({"channel": self.name}))
|
response = await self._twitch.gql_request(
|
||||||
response = await self._twitch.gql_request(op)
|
GQL_OPERATIONS["GetStreamInfo"].with_variables({"channel": self.name})
|
||||||
|
)
|
||||||
if response:
|
if response:
|
||||||
stream_data = response["data"]["user"]
|
stream_data = response["data"]["user"]
|
||||||
self.id = int(stream_data["id"]) # fill channel_id
|
self.id = int(stream_data["id"]) # fill channel_id
|
||||||
|
|||||||
Reference in new issue
Block a user