Skip to content

Commit

Permalink
Merge pull request #338 from lubaskinc0de/plusoneminusone
Browse files Browse the repository at this point in the history
completely drop 3.8
  • Loading branch information
zhPavel authored Sep 14, 2024
2 parents c1912ff + 550dba0 commit d4b2df6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ dependencies = [
classifiers = [
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
Expand Down
12 changes: 1 addition & 11 deletions src/adaptix/_internal/type_tools/basic_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,7 @@ def is_generic(tp: TypeHint) -> bool:

def is_bare_generic(tp: TypeHint) -> bool:
"""Check if the type could be parameterized, excluding type aliases (list[T] etc.)"""
return (
(
is_generic(strip_alias(tp))
# for 3.8 and List (list is not generic)
or is_generic(tp)
# at 3.8 list is bare_generic but not generic
# (this function only needs to create predicate)
or tp in BUILTIN_ORIGIN_TO_TYPEVARS
)
and not is_parametrized(tp)
)
return is_generic(tp) and not is_parametrized(tp)


def is_generic_class(cls: type) -> bool:
Expand Down

0 comments on commit d4b2df6

Please sign in to comment.