comparison mercurial/filemerge.py @ 43807:be8552f25cab

cleanup: fix docstring formatting This is just removing the b'' prefix (except demandimportpy2), and making sure it is triple quoted. I skipped the mapping.py module in zope because that's 3rd party code. Differential Revision: https://phab.mercurial-scm.org/D7539
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 01 Dec 2019 18:46:10 -0500
parents 313e3a279828
children 1ffbd03c8d75
comparison
equal deleted inserted replaced
43806:421ea5772039 43807:be8552f25cab
277 return b":prompt", None 277 return b":prompt", None
278 return b":merge", None 278 return b":merge", None
279 279
280 280
281 def _eoltype(data): 281 def _eoltype(data):
282 b"Guess the EOL type of a file" 282 """Guess the EOL type of a file"""
283 if b'\0' in data: # binary 283 if b'\0' in data: # binary
284 return None 284 return None
285 if b'\r\n' in data: # Windows 285 if b'\r\n' in data: # Windows
286 return b'\r\n' 286 return b'\r\n'
287 if b'\r' in data: # Old Mac 287 if b'\r' in data: # Old Mac
290 return b'\n' 290 return b'\n'
291 return None # unknown 291 return None # unknown
292 292
293 293
294 def _matcheol(file, back): 294 def _matcheol(file, back):
295 b"Convert EOL markers in a file to match origfile" 295 """Convert EOL markers in a file to match origfile"""
296 tostyle = _eoltype(back.data()) # No repo.wread filters? 296 tostyle = _eoltype(back.data()) # No repo.wread filters?
297 if tostyle: 297 if tostyle:
298 data = util.readfile(file) 298 data = util.readfile(file)
299 style = _eoltype(data) 299 style = _eoltype(data)
300 if style: 300 if style: