comparison hgext/eol.py @ 45942: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 9dc1351d0b5f
children 936f26b9f1cc
comparison
equal deleted inserted replaced
45941:346af7687c6f 45942:89a2afe31e82
116 116
117 configtable = {} 117 configtable = {}
118 configitem = registrar.configitem(configtable) 118 configitem = registrar.configitem(configtable)
119 119
120 configitem( 120 configitem(
121 b'eol', b'fix-trailing-newline', default=False, 121 b'eol',
122 b'fix-trailing-newline',
123 default=False,
122 ) 124 )
123 configitem( 125 configitem(
124 b'eol', b'native', default=pycompat.oslinesep, 126 b'eol',
127 b'native',
128 default=pycompat.oslinesep,
125 ) 129 )
126 configitem( 130 configitem(
127 b'eol', b'only-consistent', default=True, 131 b'eol',
132 b'only-consistent',
133 default=True,
128 ) 134 )
129 135
130 # Matches a lone LF, i.e., one that is not part of CRLF. 136 # Matches a lone LF, i.e., one that is not part of CRLF.
131 singlelf = re.compile(b'(^|[^\r])\n') 137 singlelf = re.compile(b'(^|[^\r])\n')
132 138