Commit Graph

13 Commits

Author SHA1 Message Date
Semyon Proshev
52da2a176b Fix datetime stubs (#992) 2017-03-13 09:12:46 -07:00
Lukasz Langa
fe0e3744cc Fixing flake8 E261 errors 2016-12-19 22:09:35 -08:00
KOSAKA Masayuki
3cae92253b Fix datetime.fromtimestamp (#759) 2016-12-13 14:55:06 -08:00
Kai Lautaportti
b1c545cee6 Mark use of tzinfo optional in the datetime module. (#637) 2016-10-30 12:00:18 -07:00
Eklavya Sharma
b92991bc2a Add TimeTuple in python3's time.pyi and datetime.pyi. (#597)
Add `TimeTuple = Tuple[int, int, int, int, int, int, int, int, int]`
to stdlib/3/time.pyi and stdlib/3/datetime.pyi.

Use `TimeTuple` instead of `tuple` (where relevant) in time.pyi for
stronger type checking.

Use `TimeTuple` instead of
`Tuple[int, int, int, int, int, int, int, int, int]` in datetime.pyi
to increase readability.
2016-10-11 14:48:47 -07:00
dlinnemeyer
bbf0ac2d1f Fixing timezone utc type (#568)
* switching to timezone type

* taking a shot at 2.7
2016-09-23 05:39:52 -07:00
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