Description
Stumbled on this today (Python 2 or Python 3):
print(datetime.datetime(2017, 1, 1, 12, 12, 12))
fields = [2017, 1, 1, 12, 12, 12]
print(datetime.datetime(*fields))
When run, both prints produce the expected output, but mypy complains about the second construction:
Argument 1 to "datetime" has incompatible type *List[int]; expected "tzinfo"
I'm using mypy 0.4.6 and a set of typeshed definitions I installed locally on Dec 6. Sorry I can't be more specific than that. Getting stuff into my work environment is tedious. If you can't reproduce this with the latest mypy+typeshed, just close it.
The stub for datetime.datetime.__init__
in what I have looks broken to me though. For both stdlib/2 and stdlib/3 it suggests that only the type of the year is known to be an int. Everything else other than tzinfo is given as "...". In fact, in Python 3, at least, everything after the day should be optional. Year, month, and day must be ints.