-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
RFC: from __future__ import annotations + pyupgrade #10997
RFC: from __future__ import annotations + pyupgrade #10997
Conversation
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.
noice
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.
Would be nice to be able to use the new syntax!
@nicoddemus this one has a major total anhillating force for the automatic backporting Any idea how we can work with that (or do we backport this one's) Once we have a idea on backport I'll fix it up and see it through |
Yeah, it needs either a backport itself or to wait for the release of the next minor being imminent before merging. Depending on the confidence we have it's not going to break the maintenance branch.. |
That's the main point I think. Can we think of cases where backporting this could break downstream users somehow in a patch release? |
Let's give it a call out, we might Learn of really interesting (or horrifying) use cases for the annotations Im going to take a look at fixup /backport fixup soonish |
@nicoddemus @bluetech now that 8x. and 7.4 had some major releases, i'd like to propose porting main and 8.x over to the new syntax, i'll try to get it tried this weekend |
394560a
to
c172383
Compare
this pr as is may be a complete pain to review - i wonder if i ought to split it across some logical/file boundaries |
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.
A few formatting comments but LGTM. I suggest merging quickly to avoid conflicts.
expected_exception: builtins.type[BaseException] | ||
| tuple[builtins.type[BaseException], ...], |
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.
Would wrap in parens to make the formatting less weird
expected_exception: builtins.type[BaseException] | ||
| tuple[builtins.type[BaseException], ...], |
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.
Would wrap in parens to make the formatting less weird
ids: Optional[ | ||
Union[Tuple[Optional[object], ...], Callable[[Any], Optional[object]]] | ||
] = None, | ||
ids: None | (tuple[object | None, ...] | Callable[[Any], object | None]) = None, |
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.
Redundant parens
Union[Tuple[Optional[object], ...], Callable[[Any], Optional[object]]] | ||
] = None | ||
name: Optional[str] = None | ||
ids: None | (tuple[object | None, ...] | Callable[[Any], object | None]) = None |
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.
Redundant parens
Union[Sequence[Optional[object]], Callable[[Any], Optional[object]]] | ||
] = ..., | ||
name: Optional[str] = ..., | ||
ids: None | (Sequence[object | None] | Callable[[Any], object | None]) = ..., |
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.
Redundant parens
Union[Sequence[Optional[object]], Callable[[Any], Optional[object]]] | ||
] = ..., | ||
name: Optional[str] = None, | ||
ids: None | (Sequence[object | None] | Callable[[Any], object | None]) = ..., |
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.
Redundant parens
] = None, | ||
name: Optional[str] = None, | ||
) -> Union[FixtureFunctionMarker, FixtureFunction]: | ||
ids: None | (Sequence[object | None] | Callable[[Any], object | None]) = None, |
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.
Redundant parens
ids: None | ||
| ( | ||
Iterable[None | str | float | int | bool] | ||
| Callable[[Any], object | None] | ||
) = ..., |
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.
Redundant parens & weird formatting
argnames: str | Sequence[str], | ||
argvalues: Iterable[ParameterSet | Sequence[object] | object], | ||
indirect: bool | Sequence[str] = False, | ||
ids: None | (Iterable[object | None] | Callable[[Any], object | None]) = None, |
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.
Redundant parens
Agree, I won't have time to review this in a timely manner, but please go ahead. Also I suggest to squash the commits into a single one, as the last two are just fixups. |
i'll add a few more fixups, then squash and submit for final merge |
c172383
to
c6175e0
Compare
closing in favor of #12467 |
No description provided.