8000 `Fraction.__new__` now accepts anything with `.as_integer_ratio()` by InSyncWithFoo · Pull Request #12994 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Fraction.__new__ now accepts anything with .as_integer_ratio() #12994

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

Merged
merged 7 commits into from
Nov 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update stdlib/fractions.pyi
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
InSyncWithFoo and AlexWaygood authored Nov 11, 2024
commit e7f709524866be4bc5ad6d2430d4acb545b1b6c4
2 changes: 1 addition & 1 deletion stdlib/fractions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ else:

_IR = TypeVar("_IR", covariant=True)

class ConvertibleToIntegerRatio(Protocol[_IR]):
class _ConvertibleToIntegerRatio(Protocol[_IR]):
def as_integer_ratio(self) -> _IR: ...

class Fraction(Rational):
Expand Down
Loading
0