Skip to content

Commit

Permalink
Ignore warnings for Python 2-specific code when flake8 is run with Py…
Browse files Browse the repository at this point in the history
…thon 3
  • Loading branch information
p-e-w committed Jun 12, 2016
1 parent 26bc77a commit e5b8a1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions maybe/maybe.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def parse_argument(argument):
# (see http://stackoverflow.com/a/24886425)
argument = literal_eval(argument.createText())
if PY2 and isinstance(argument, str):
argument = unicode(argument, sys.getfilesystemencoding())
argument = unicode(argument, sys.getfilesystemencoding()) # noqa
return argument


Expand Down Expand Up @@ -115,7 +115,7 @@ def get_operations(debugger, syscall_filters, verbose):

def main(argv=sys.argv[1:]):
if PY2:
argv = [unicode(arg, sys.getfilesystemencoding()) for arg in argv]
argv = [unicode(arg, sys.getfilesystemencoding()) for arg in argv] # noqa

# Insert positional argument separator, if not already present
if "--" not in argv:
Expand Down
2 changes: 1 addition & 1 deletion tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def maybe(arguments):

def to_unicode(string):
if PY2:
return unicode(string, sys.getfilesystemencoding())
return unicode(string, sys.getfilesystemencoding()) # noqa
else:
return string

Expand Down

0 comments on commit e5b8a1d

Please sign in to comment.