-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Support version specifiers in GH action #3265
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,9 +14,10 @@ | |
|
||
run([sys.executable, "-m", "venv", str(ENV_PATH)], check=True) | ||
|
||
req = "black[colorama]" | ||
if VERSION: | ||
req += f"=={VERSION}" | ||
version_specifier = VERSION | ||
if VERSION and VERSION[0] in "0123456789": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess it's fine either way, since we only care about recognising version specifier characters, which won't be decimal or digits. But no biggie. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do packaging tools normalize non-ascii digits? If so, I'd prefer There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
So in the end, it shouldn't matter whether we use |
||
version_specifier = f"=={VERSION}" | ||
req = f"black[colorama]{version_specifier}" | ||
pip_proc = run( | ||
[str(ENV_BIN / "python"), "-m", "pip", "install", req], | ||
stdout=PIPE, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah damn, I didn't notice this comment before I made mine 😄 I can change it, though I would like to note that isdecimal is less wide check than isdigit so it might be better choice if we're switching it.