Skip to content

Commit

Permalink
Remove last direct use of typing_extensions as we assume Python 3.11 (#…
Browse files Browse the repository at this point in the history
…1007)

Literal is already just-plain-imported-from-typing elsewhere in the code.
Moreover, generic_parser.py uses := so already requires Python >= 3.8.
  • Loading branch information
jmarshall authored Jan 8, 2025
1 parent bff27bd commit 042c0ce
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 1 addition & 7 deletions metamist/parser/generic_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import logging
import os
import re
import sys
from abc import abstractmethod
from collections import defaultdict
from functools import wraps
Expand All @@ -17,6 +16,7 @@
Hashable,
Iterable,
Iterator,
Literal,
Match,
Sequence,
TypeVar,
Expand All @@ -37,12 +37,6 @@
)
from metamist.parser.cloudhelper import CloudHelper, group_by

# https://mypy.readthedocs.io/en/stable/runtime_troubles.html#using-new-additions-to-the-typing-module
if sys.version_info >= (3, 8):
from typing import Literal
else:
from typing_extensions import Literal

logging.basicConfig(level=logging.WARNING)
logger = logging.getLogger(__file__)

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
'urllib3 >= 1.25.3',
'python-dateutil',
'requests',
'typing-extensions',
# for get id-token
'cpg-utils >= 5.0.5',
'gql[aiohttp,requests]',
Expand Down

0 comments on commit 042c0ce

Please sign in to comment.