Skip to content

Commit

Permalink
Move constant declaration to top of file
Browse files Browse the repository at this point in the history
Fixes flake8 error
  • Loading branch information
Hwesta committed Jan 2, 2017
1 parent c00c074 commit bfba927
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions fido/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
from .pronomutils import get_local_pronom_versions


# \a\b\n\r\t\v
# MdR: took out '<' and '>' out of _ordinary because they were converted to entities &lt;&gt;
# MdR: moved '!' from _ordinary to _special because it means "NOT" in the regex world. At this time no regex in any sig has a negate set, did this to be on the safe side
_ordinary = frozenset(' "#%&\',-/0123456789:;=@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~')
_special = '$()*+.?![]^\\{|}'
_hex = '0123456789abcdef'


class NS:
"""
Helper class for XML name spaces in ElementTree.
Expand Down Expand Up @@ -344,13 +352,6 @@ def doByte(chars, i, littleendian):
val = chr(c1 + 16 * c2)
return (escape(val), 2)

# \a\b\n\r\t\v
# MdR: took out '<' and '>' out of _ordinary because they were converted to entities &lt;&gt;
# MdR: moved '!' from _ordinary to _special because it means "NOT" in the regex world. At this time no regex in any sig has a negate set, did this to be on the safe side
_ordinary = frozenset(' "#%&\',-/0123456789:;=@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~')
_special = '$()*+.?![]^\\{|}'
_hex = '0123456789abcdef'


def _escape_char(c):
if c in '\n':
Expand Down

0 comments on commit bfba927

Please sign in to comment.