Mercurial > public > mercurial-scm > hg-stable
diff mercurial/rcutil.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 | 238790674d69 |
children | 6000f5b25c9b |
line wrap: on
line diff
--- a/mercurial/rcutil.py Fri Nov 27 17:00:00 2020 -0500 +++ b/mercurial/rcutil.py Fri Nov 27 17:03:29 2020 -0500 @@ -39,13 +39,13 @@ def envrcitems(env=None): - '''Return [(section, name, value, source)] config items. + """Return [(section, name, value, source)] config items. The config items are extracted from environment variables specified by env, used to override systemrc, but not userrc. If env is not provided, encoding.environ will be used. - ''' + """ if env is None: env = encoding.environ checklist = [ @@ -73,7 +73,7 @@ def rccomponents(): - '''return an ordered [(type, obj)] about where to load configs. + """return an ordered [(type, obj)] about where to load configs. respect $HGRCPATH. if $HGRCPATH is empty, only .hg/hgrc of current repo is used. if $HGRCPATH is not set, the platform default will be used. @@ -84,7 +84,7 @@ obj is a string, and is the config file path. if type is 'items', obj is a list of (section, name, value, source) that should fill the config directly. If type is 'resource', obj is a tuple of (package name, resource name). - ''' + """ envrc = (b'items', envrcitems()) if b'HGRCPATH' in encoding.environ: @@ -108,9 +108,9 @@ def defaultpagerenv(): - '''return a dict of default environment variables and their values, + """return a dict of default environment variables and their values, intended to be set before starting a pager. - ''' + """ return {b'LESS': b'FRX', b'LV': b'-c'}