-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
Fix internal tests invoked from zsh shell #1513
Conversation
Before this fix some of the internal hatch tests were failing when invoked from zsh shell. This change updates the test fixture to use the same shell detection mechanism as in the actual hatch code.
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.
Thanks!
src/hatch/utils/shells.py
Outdated
from hatch.utils.platform import Platform | ||
|
||
|
||
Shell: TypeAlias = tuple[str, str] |
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.
I would prefer if we could please put the return type directly on the function without a dedicated type alias.
src/hatch/cli/python/install.py
Outdated
@@ -41,10 +43,7 @@ def install(app: Application, *, names: tuple[str, ...], private: bool, update: | |||
from hatch.python.distributions import ORDERED_DISTRIBUTIONS | |||
from hatch.python.resolve import get_distribution | |||
|
|||
shells = [] | |||
if not private and not app.platform.windows: |
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.
I'm going to revert this part because we want this conditional to prevent the shell detection logic for performance reasons.
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.
Thanks again!
Thanks for merging it and your feedback, I appreciate! I'm sorry I didn't improve the PR myself but I was on my way back home from PyCon. |
No worries, it was a fun conference! |
Before this fix some of the internal hatch tests were failing when invoked from zsh shell. This change updates the test fixture to use the same shell detection mechanism as in the actual hatch code.
One of the test errors before the fix: