comparison roundup/msgfmt.py @ 6033:4d2e1fa03f0f

flake8 format fixes, ignore 'file' as it is a type under py2
author John Rouillard <rouilj@ieee.org>
date Fri, 03 Jan 2020 21:22:36 -0500
parents f2fade4552c5
children 6a1c1cd69582
comparison
equal deleted inserted replaced
6032:238dafbe521c 6033:4d2e1fa03f0f
51 def header_charset(s): 51 def header_charset(s):
52 p = HeaderParser() 52 p = HeaderParser()
53 return p.parsestr(s.encode('utf-8', 'ignore')).get_content_charset() 53 return p.parsestr(s.encode('utf-8', 'ignore')).get_content_charset()
54 54
55 from cStringIO import StringIO as BytesIO 55 from cStringIO import StringIO as BytesIO
56 FILE_TYPE = file 56 # file is a type defined only under python 2.
57 # Flake8 when run in py3 flags this.
58 FILE_TYPE = file # noqa: 821
57 59
58 60
59 class PoSyntaxError(Exception): 61 class PoSyntaxError(Exception):
60 """ Syntax error in a po file """ 62 """ Syntax error in a po file """
61 63

Roundup Issue Tracker: http://roundup-tracker.org/