Commit Graph

7 Commits

Author SHA1 Message Date
Samuel Colvin
773ad48c04 correct utcoffset return type (#554) 2016-09-18 13:44:38 -07:00
Daniel F Moisset
fac745c90b Allow replace(tz_info=None) on time/datetime (#485)
* Allow replace(tz_info=None) on time/datetime

* Remove bool option for replace(tzinfo=...)
2016-08-24 06:05:21 -07:00
kosaka
5a79ba1abb Fixes tzinfo return types (#476) 2016-08-16 08:07:00 -07:00
Tim Abbott
6da0bcec4c Fix argument type for datetime.now. (#268)
It seems to actually take a tzinfo argument, not its subclass
timezone.
2016-06-06 15:21:11 -07:00
Ran Benita
eab591bb08 Change datetime.datetime.astimezone tz argument type from timezone to tzinfo (#186)
timezone inherits from tzinfo, so using tzinfo is more general (and e.g.
pytz types inherit directly from tzinfo).

This is the correct type, as quoted from astimezone's code:

    elif not isinstance(tz, tzinfo):
        raise TypeError("tz argument must be an instance of tzinfo")
2016-05-06 08:06:22 -07:00
Tim Abbott
920def0b1e Fix datetime.timedelta() argument types to be floats. 2016-01-26 16:30:15 -08:00
Guido van Rossum
8c2118bace Move contents of builtins/* to stdlib/*. This simplifies finding stubs. 2016-01-12 12:53:18 -08:00