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

⚡️ Speed up function _get_url_for_version by 29% in python_modules/dagster/dagster/_generate/download.py #78

Open
wants to merge 1 commit into
base: codeflash/optimize-remove_none_recursively-2024-06-26T09.20.53
Choose a base branch
from
Open
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
11 changes: 3 additions & 8 deletions python_modules/dagster/dagster/_generate/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,12 @@


def _get_target_for_version(version: str) -> str:
if version == "1!0+dev":
target = "master"
else:
target = version
return target
return "master" if version == "1!0+dev" else version


def _get_url_for_version(version: str) -> str:
return (
f"https://codeload.github.com/dagster-io/dagster/tar.gz/{_get_target_for_version(version)}"
)
target = "master" if version == "1!0+dev" else version
return f"https://codeload.github.com/dagster-io/dagster/tar.gz/{target}"


def download_example_from_github(path: str, example: str, version: str):
Expand Down