Skip to content

Commit afa0382

Browse files
EepyElvyraFayeDelpre-commit-ci[bot]
authored
Fix: fix check in get method (#928)
* Update get.py * ci: correct from checks. Co-authored-by: DeltaX <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 1b4f4d2 commit afa0382

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

interactions/client/get.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,11 @@ def get(client: Client, obj: Type[_T], **kwargs) -> Optional[_T]:
169169
if version_info >= (3, 9):
170170

171171
def _check():
172-
return obj == list[get_args(obj)[0]]
172+
return (
173+
obj == list[get_args(obj)[0]]
174+
if isinstance(get_args(obj), tuple) and get_args(obj)
175+
else False
176+
)
173177

174178
else:
175179

0 commit comments

Comments
 (0)