For instance, documentation says:
Note however that timeit will automatically determine the number of repetitions only when the command-line interface
As of Python 3.6, timeit.Timer objects have an autorange function that exposes how number is determined for command line execution.
number