Skip to content

Conversation

@mgaeta
Copy link
Contributor

@mgaeta mgaeta commented Oct 29, 2021

Now that we're on python 3.8 we have access to | notation in types and no longer need to quote models. To create this PR, I added from __future__ import annotations to every file and let pyupgrade automatically retype everything.



def unsplit_key(
project: "Project", target_type: ActionTargetType, target_identifier: Optional[str]
Copy link
Member

Choose a reason for hiding this comment

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

Is there a functional difference between Optional[str] and str | None?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Optional[str] is equivalent to Union[str, None] which is equivalent to str | None.

@mgaeta mgaeta merged commit 5bd7495 into master Oct 29, 2021
@mgaeta mgaeta deleted the feat/api-2202-slack-digest-2 branch October 29, 2021 23:07
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants