Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consistently annotate Scheduler._timeout_hours as float | None (#2951)
Summary: Context: * `Scheduler._timeout_hours`, `ScheduleOptions.timeout_hours`, and `timeout_hours` arguments are variously annotated as `int | None`, `float | None`, or `int | float | None`, even though ints and floats are both consistently supported. * PEP 484 states that `float` is an acceptable annotation where `int | float` is accepted; an int can be treated as a subtype of a float for typing purposes. Note: Before finding out that int can be considered a subtype of float, I tried to use the ABCs from `numbers` as a nicer way of annotating `int | float`, but then found out that `numbers.Real` does not support post-multiplication by an int, and floats are not covered by `numbers.Rational`, so that didn't work. This PR: * Changes all these annotations to `float | None` Differential Revision: D64897260
- Loading branch information