Skip to content

inline conditional imports for cli behaviors#4606

Merged
davidism merged 1 commit into
2.1.xfrom
cli-imports
May 23, 2022
Merged

inline conditional imports for cli behaviors#4606
davidism merged 1 commit into
2.1.xfrom
cli-imports

Conversation

@davidism
Copy link
Copy Markdown
Member

@davidism davidism commented May 23, 2022

dotenv, ssl, and importlib_metadata are only used in certain parts when running flask CLI commands. Don't import them at the top level. This also makes type checking a bit easier, since mypy doesn't like conditional imports.

@davidism davidism added this to the 2.1.3 milestone May 23, 2022
@davidism davidism merged commit 31aad11 into 2.1.x May 23, 2022
@davidism davidism deleted the cli-imports branch May 23, 2022 16:51
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant