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

#30 // Fix environments #31

Merged
merged 5 commits into from
Apr 13, 2021
Merged

#30 // Fix environments #31

merged 5 commits into from
Apr 13, 2021

Conversation

jonapich
Copy link
Collaborator

Should fix #30


@contextmanager
def _activate_poetry_environment(
self, environment: PythonEnvironment = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be Optional[PythonEnvironment]? Actually I'm surprise that mypy doesn't complain... 🤔 Did you do some magic so that PythonEnvironment can be None?

Copy link
Collaborator

@jfsmith-at-coveo jfsmith-at-coveo Apr 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's exactly that. Optional is implied when default is None. Compare with the annotation of _cached_activated_environment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well actually... seems like this is actually deprecated and we should start putting Optional everywhere... 😱

python/mypy#9091

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

Copy link
Collaborator Author

@jonapich jonapich Apr 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anyway, we'll do them all at the same time. no need to do this here.

@klalumiere klalumiere self-requested a review April 13, 2021 01:18
@jonapich jonapich merged commit cba33d9 into main Apr 13, 2021
@jonapich jonapich deleted the fix/environments branch April 13, 2021 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mypy runner may create extra python environment
3 participants