Mercurial > public > mercurial-scm > hg-stable
diff mercurial/utils/dateutil.py @ 45957:89a2afe31e82
formating: upgrade to black 20.8b1
This required a couple of small tweaks to un-confuse black, but now it
works. Big formatting changes come from:
* Dramatically improved collection-splitting logic upstream
* Black having a strong (correct IMO) opinion that """ is better than '''
Differential Revision: https://phab.mercurial-scm.org/D9430
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Fri, 27 Nov 2020 17:03:29 -0500 |
parents | b65bd4b61d78 |
children | 6894c9ef4dcd |
line wrap: on
line diff
--- a/mercurial/utils/dateutil.py Fri Nov 27 17:00:00 2020 -0500 +++ b/mercurial/utils/dateutil.py Fri Nov 27 17:03:29 2020 -0500 @@ -53,12 +53,17 @@ b'%I:%M%p', ) -extendeddateformats = defaultdateformats + (b"%Y", b"%Y-%m", b"%b", b"%b %Y",) +extendeddateformats = defaultdateformats + ( + b"%Y", + b"%Y-%m", + b"%b", + b"%b %Y", +) def makedate(timestamp=None): - '''Return a unix timestamp (or the current time) as a (unixtime, - offset) tuple based off the local timezone.''' + """Return a unix timestamp (or the current time) as a (unixtime, + offset) tuple based off the local timezone.""" if timestamp is None: timestamp = time.time() if timestamp < 0: @@ -115,7 +120,7 @@ def parsetimezone(s): """find a trailing timezone, if any, in string, and return a - (offset, remainder) pair""" + (offset, remainder) pair""" s = pycompat.bytestr(s) if s.endswith(b"GMT") or s.endswith(b"UTC"):