Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.3k
gh-109798: Normalize_datetime
anddatetime
error messages#127345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
764eb1b
2bf419f
4363e9e
9da0dfc
179423d
f691251
d8973cf
5eea62f
79543cc
d174497
498c4ba
216d0fe
c409fec
3f454f6
a2b8f7a
209c338
0777aa5
4d31d33
f05ebba
f840105
61c95a5
2ab77b3
b1e272a
7a35bd4
cfd18cb
2827514
cd3bdc1
9915dfe
1da5a3a
610f067
410e0ce
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -545,7 +545,7 @@ def _isoweek_to_gregorian(year, week, day): | ||
def _check_tzname(name): | ||
if name is not None and not isinstance(name, str): | ||
raise TypeError("tzinfo.tzname() must return None or string, " | ||
"not '%s'" % type(name).__name__) | ||
donBarbos marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
# name is the offset-producing method, "utcoffset" or "dst". | ||
# offset is what it returned. | ||
@@ -559,7 +559,8 @@ def _check_utc_offset(name, offset): | ||
return | ||
if not isinstance(offset, timedelta): | ||
raise TypeError("tzinfo.%s() must return None " | ||
donBarbos marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
"or timedelta, not '%s'" | ||
% (name, type(offset).__name__)) | ||
donBarbos marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
if not -timedelta(1) < offset < timedelta(1): | ||
raise ValueError("offset must be a timedelta " | ||
"strictly between -timedelta(hours=24) and " | ||
@@ -597,7 +598,10 @@ def _check_time_fields(hour, minute, second, microsecond, fold): | ||
def _check_tzinfo_arg(tz): | ||
if tz is not None and not isinstance(tz, tzinfo): | ||
raise TypeError( | ||
"tzinfo argument must be None or of a tzinfo subclass, " | ||
f"not type '{type(tz).__name__}'" | ||
donBarbos marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
) | ||
def _divide_and_round(a, b): | ||
"""divide a by b and round result to the nearest integer | ||
Uh oh!
There was an error while loading.Please reload this page.