Skip to content

Start adding types to Submodule, add py.typed to manifest #1282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 1, 2021
Prev Previous commit
Next Next commit
Put protocol behind py version check
  • Loading branch information
Yobmod committed Jun 30, 2021
commit 52665218a64405e1cb6c90b6ef28720065409041
8 changes: 2 additions & 6 deletions git/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@
import sys
from typing import Dict, Union, Any, TYPE_CHECKING

if sys.version_info[:2] >= (3, 7):
from typing import Protocol # noqa: F401
else:
from typing_extensions import Protocol # noqa: F401

if sys.version_info[:2] >= (3, 8):
from typing import Final, Literal, SupportsIndex, TypedDict # noqa: F401
from typing import Final, Literal, SupportsIndex, TypedDict, Protocol # noqa: F401
else:
from typing_extensions import Final, Literal, SupportsIndex, TypedDict # noqa: F401
from typing_extensions import Final, Literal, SupportsIndex, TypedDict, Protocol # noqa: F401

if sys.version_info[:2] >= (3, 10):
from typing import TypeGuard # noqa: F401
Expand Down