Skip to content

typehints and imports #627

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

Closed
mattsb42-aws opened this issue May 1, 2023 · 2 comments
Closed

typehints and imports #627

mattsb42-aws opened this issue May 1, 2023 · 2 comments

Comments

@mattsb42-aws
Copy link
Member

Just wanted to let y'all know that you can remove stuff like this now that your minimum supported Python version is 3.7.

try: # Python 3.5.0 and 3.5.1 have incompatible typing modules
from typing import Dict, Iterable, List, Optional, Set, Text # noqa pylint: disable=unused-import
except ImportError: # pragma: no cover
# We only actually need these imports when running the mypy checks
pass

I put those in because the version of the typing library for specifically 3.5.0 and 3.5.1 only has a subset of the type definitions present for newer versions. Since the typehints are all in comments (another thing you can change now that you don't support 2.7 anymore), the imports were only necessary when running mypy, thus the except: pass rather than stubbing.

@khubaibalam2000
Copy link
Contributor

Can I work on this issue?

@khubaibalam2000
Copy link
Contributor

Resolved in #740.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants