mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2024-11-21 14:18:57 -07:00
Style fixes
Calm pyflakes by using identifiers, and change hexversion to version.major.
This commit is contained in:
parent
09556d5fbc
commit
f0068dd3bc
6 changed files with 9 additions and 2 deletions
|
@ -1982,3 +1982,5 @@ def llXorBase64StringsCorrect(s, xor):
|
|||
if xor[i] == b'\x00':
|
||||
i = 0
|
||||
return b64encode(ret).decode('utf8')
|
||||
|
||||
lslbasefuncs_used = True
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
import sys
|
||||
from strutil import *
|
||||
strutil_used
|
||||
|
||||
_exclusions = frozenset(('nt','t','name','value','ch', 'X','SEF'))
|
||||
|
||||
|
|
|
@ -20,3 +20,4 @@
|
|||
from lslopt.lslbasefuncs import *
|
||||
from lslopt.lsljson import *
|
||||
from lslopt.lslextrafuncs import *
|
||||
lslbasefuncs_used
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
from lslopt.lslcommon import Key, Vector, Quaternion, types, nr
|
||||
from lslopt import lslcommon, lslfuncs
|
||||
from strutil import *
|
||||
strutil_used
|
||||
import re
|
||||
|
||||
# Note this module was basically written from bottom to top, which may help
|
||||
|
|
|
@ -56,7 +56,7 @@ try:
|
|||
import difflib
|
||||
except ImportError:
|
||||
difflib = None
|
||||
if sys.hexversion < 0x3000000:
|
||||
if sys.version_info.major < 3:
|
||||
from StringIO import StringIO as StringStream
|
||||
else:
|
||||
from io import BytesIO as StringStream
|
||||
|
|
|
@ -22,7 +22,7 @@ import codecs
|
|||
codecs.register(lambda x: codecs.lookup('utf8') if x == 'cp65001' else None)
|
||||
|
||||
import sys
|
||||
if sys.hexversion >= 0x3000000:
|
||||
if sys.version_info.major >= 3:
|
||||
unicode = str
|
||||
unichr = chr
|
||||
def str2u(s, enc=None):
|
||||
|
@ -87,3 +87,5 @@ def werr(s):
|
|||
def wout(s):
|
||||
"""Write any string to stdout"""
|
||||
sys.stdout.write(any2u(s, sys.stdout))
|
||||
|
||||
strutil_used = True
|
||||
|
|
Loading…
Reference in a new issue