Commits

David Jean Louis committed a3f97e5

Imports cleanup

  • Participants
  • Parent commits f11e0b1

Comments (0)

Files changed (1)

 __all__       = ['pofile', 'POFile', 'POEntry', 'mofile', 'MOFile', 'MOEntry',
                  'detect_encoding', 'escape', 'unescape', 'detect_encoding',]
 
+import array
+import codecs
 import os
-import codecs
+import re
 import struct
 import textwrap
 import types
-import re
 
 default_encoding = 'utf-8'
 
     >>> print(detect_encoding('tests/test_iso-8859-15.mo', True))
     ISO_8859-15
     """
-    import re
     rx = re.compile(r'"?Content-Type:.+? charset=([\w_\-:\.]+)')
 
     def charset_exists(charset):
         Return the mofile binary representation.
         """
         import array
-        import struct
-        import types
         offsets = []
         entries = self.translated_entries()
         # the keys are sorted in the .mo file