Lines Matching refs:isinstance

493     if name is not None and not isinstance(name, str):
507 if not isinstance(offset, timedelta):
546 if tz is not None and not isinstance(tz, tzinfo):
615 if isinstance(days, float):
625 assert isinstance(daysecondsfrac, float)
627 assert isinstance(d, int)
631 if isinstance(seconds, float):
640 assert isinstance(secondsfrac, float)
643 assert isinstance(seconds, int)
647 assert isinstance(s, int)
655 if isinstance(microseconds, float):
668 assert isinstance(s, int)
669 assert isinstance(microseconds, int)
679 assert isinstance(d, int)
680 assert isinstance(s, int) and 0 <= s < 24*3600
681 assert isinstance(us, int) and 0 <= us < 1000000
741 if isinstance(other, timedelta):
752 if isinstance(other, timedelta):
761 if isinstance(other, timedelta):
782 if isinstance(other, int):
788 if isinstance(other, float):
801 if not isinstance(other, (int, timedelta)):
804 if isinstance(other, timedelta):
806 if isinstance(other, int):
810 if not isinstance(other, (int, float, timedelta)):
813 if isinstance(other, timedelta):
815 if isinstance(other, int):
817 if isinstance(other, float):
822 if isinstance(other, timedelta):
828 if isinstance(other, timedelta):
837 if isinstance(other, timedelta):
843 if isinstance(other, timedelta):
849 if isinstance(other, timedelta):
855 if isinstance(other, timedelta):
861 if isinstance(other, timedelta):
867 assert isinstance(other, timedelta)
931 isinstance(year, (bytes, str)) and len(year) == 4 and
934 if isinstance(year, str):
982 if not isinstance(date_string, str):
1041 if not isinstance(fmt, str):
1105 if isinstance(other, date):
1110 if isinstance(other, date):
1115 if isinstance(other, date):
1120 if isinstance(other, date):
1125 if isinstance(other, date):
1130 assert isinstance(other, date)
1145 if isinstance(other, timedelta):
1156 if isinstance(other, timedelta):
1158 if isinstance(other, date):
1249 if not isinstance(dt, datetime):
1350 if (isinstance(hour, (bytes, str)) and len(hour) == 6 and
1353 if isinstance(hour, str):
1414 if isinstance(other, time):
1420 if isinstance(other, time):
1426 if isinstance(other, time):
1432 if isinstance(other, time):
1438 if isinstance(other, time):
1444 assert isinstance(other, time)
1540 if not isinstance(time_string, str):
1566 if not isinstance(fmt, str):
1644 if tzinfo is not None and not isinstance(tzinfo, _tzinfo_class):
1679 if (isinstance(year, (bytes, str)) and len(year) == 10 and
1682 if isinstance(year, str):
1816 if not isinstance(date, _date_class):
1818 if not isinstance(time, _time_class):
1829 if not isinstance(date_string, str):
1975 elif not isinstance(tz, tzinfo):
2105 if isinstance(other, datetime):
2107 elif not isinstance(other, date):
2113 if isinstance(other, datetime):
2115 elif not isinstance(other, date):
2121 if isinstance(other, datetime):
2123 elif not isinstance(other, date):
2129 if isinstance(other, datetime):
2131 elif not isinstance(other, date):
2137 if isinstance(other, datetime):
2139 elif not isinstance(other, date):
2145 assert isinstance(other, datetime)
2183 if not isinstance(other, timedelta):
2204 if not isinstance(other, datetime):
2205 if isinstance(other, timedelta):
2259 if tzinfo is not None and not isinstance(tzinfo, _tzinfo_class):
2303 if not isinstance(offset, timedelta):
2309 elif not isinstance(name, str):
2331 if isinstance(other, timezone):
2362 if isinstance(dt, datetime) or dt is None:
2368 if isinstance(dt, datetime) or dt is None:
2376 if isinstance(dt, datetime) or dt is None:
2382 if isinstance(dt, datetime):