mesa
mesa copied to clipboard
Issue1341
solving the issue of replacing Union[a, b] with a | b and Optional[a] with a | None in type annotations:
Replacing Union[a, b] with a | b:
Improves readability and clarity of type hints. Makes it easier to understand what types are allowed for a variable or function parameter. Provides better type checking by the static type checker. Replacing Optional[a] with a | None:
Similar benefits to replacing Union[a, b] with a | b. More concise and idiomatic way to represent optional types in Python 3.8+
Aryan1Mahajahn
Thanks for your contribution! If you have any questions about why the CI test are failing or how to resolve it, let me know.
If you want an easy trick for resolving the pre-commit error, you can do this trick.
I have addressed the import issue manually and am encountering difficulties with the pre-commit.ci autofix mechanism.
@Aryan1Mahahjan here you go: pre-commit.ci autofix
pre-commit.ci autofix
Makes me wonder if GitHub may support auto-complete for some keyword commands (that possibly start with /
), like in IRC or Slack. Someone might have already raised this at https://github.com/orgs/community/discussions.
@Aryan1Mahahjan You created a code conflict, you can see it if you press the "Resolve conflicts" button below. Once you resolve that pre-commit will work again.
pre-commit.ci autofix
May I kindly request permission to create a new pull request? Regrettably, there was a mistake in merging with the incorrect branch, and I would like to rectify the situation promptly. Your approval for this corrective action would be greatly appreciated.
Yes of course.
And no need to be so formal :)
If I understand it correctly, this PR is superseded by #2003. So this PR can be closed?
Yes indeed. Hope we can merge #2003 soon after the release.