Skip to content
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

Refactor unneeded 'continue' jumps in setup.py #33848

Merged
merged 1 commit into from
Sep 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,9 +610,8 @@ def add_extras_for_all_deprecated_aliases() -> None:
"""
for alias, extra in EXTRAS_DEPRECATED_ALIASES.items():
dependencies = EXTRAS_DEPENDENCIES.get(extra) if extra != "" else []
if dependencies is None:
continue
EXTRAS_DEPENDENCIES[alias] = dependencies
if dependencies is not None:
EXTRAS_DEPENDENCIES[alias] = dependencies


def add_all_deprecated_provider_packages() -> None:
Expand All @@ -623,9 +622,8 @@ def add_all_deprecated_provider_packages() -> None:
{"kubernetes": ["apache-airflow-provider-cncf-kubernetes"]}
"""
for alias, provider in EXTRAS_DEPRECATED_ALIASES.items():
if alias in EXTRAS_DEPRECATED_ALIASES_NOT_PROVIDERS:
continue
replace_extra_dependencies_with_provider_packages(alias, [provider])
if alias not in EXTRAS_DEPRECATED_ALIASES_NOT_PROVIDERS:
replace_extra_dependencies_with_provider_packages(alias, [provider])


add_extras_for_all_deprecated_aliases()
Expand Down Expand Up @@ -665,10 +663,9 @@ def add_all_deprecated_provider_packages() -> None:
def get_all_db_dependencies() -> list[str]:
_all_db_reqs: set[str] = set()
for provider in ALL_DB_PROVIDERS:
if provider not in PROVIDER_DEPENDENCIES:
continue
for req in PROVIDER_DEPENDENCIES[provider][DEPS]:
_all_db_reqs.add(req)
if provider in PROVIDER_DEPENDENCIES:
for req in PROVIDER_DEPENDENCIES[provider][DEPS]:
_all_db_reqs.add(req)
return list(_all_db_reqs)


Expand Down