mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00: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':
|
if xor[i] == b'\x00':
|
||||||
i = 0
|
i = 0
|
||||||
return b64encode(ret).decode('utf8')
|
return b64encode(ret).decode('utf8')
|
||||||
|
|
||||||
|
lslbasefuncs_used = True
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from strutil import *
|
from strutil import *
|
||||||
|
strutil_used
|
||||||
|
|
||||||
_exclusions = frozenset(('nt','t','name','value','ch', 'X','SEF'))
|
_exclusions = frozenset(('nt','t','name','value','ch', 'X','SEF'))
|
||||||
|
|
||||||
|
|
|
@ -20,3 +20,4 @@
|
||||||
from lslopt.lslbasefuncs import *
|
from lslopt.lslbasefuncs import *
|
||||||
from lslopt.lsljson import *
|
from lslopt.lsljson import *
|
||||||
from lslopt.lslextrafuncs import *
|
from lslopt.lslextrafuncs import *
|
||||||
|
lslbasefuncs_used
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
from lslopt.lslcommon import Key, Vector, Quaternion, types, nr
|
from lslopt.lslcommon import Key, Vector, Quaternion, types, nr
|
||||||
from lslopt import lslcommon, lslfuncs
|
from lslopt import lslcommon, lslfuncs
|
||||||
from strutil import *
|
from strutil import *
|
||||||
|
strutil_used
|
||||||
import re
|
import re
|
||||||
|
|
||||||
# Note this module was basically written from bottom to top, which may help
|
# Note this module was basically written from bottom to top, which may help
|
||||||
|
|
|
@ -56,7 +56,7 @@ try:
|
||||||
import difflib
|
import difflib
|
||||||
except ImportError:
|
except ImportError:
|
||||||
difflib = None
|
difflib = None
|
||||||
if sys.hexversion < 0x3000000:
|
if sys.version_info.major < 3:
|
||||||
from StringIO import StringIO as StringStream
|
from StringIO import StringIO as StringStream
|
||||||
else:
|
else:
|
||||||
from io import BytesIO as StringStream
|
from io import BytesIO as StringStream
|
||||||
|
|
|
@ -22,7 +22,7 @@ import codecs
|
||||||
codecs.register(lambda x: codecs.lookup('utf8') if x == 'cp65001' else None)
|
codecs.register(lambda x: codecs.lookup('utf8') if x == 'cp65001' else None)
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
if sys.hexversion >= 0x3000000:
|
if sys.version_info.major >= 3:
|
||||||
unicode = str
|
unicode = str
|
||||||
unichr = chr
|
unichr = chr
|
||||||
def str2u(s, enc=None):
|
def str2u(s, enc=None):
|
||||||
|
@ -87,3 +87,5 @@ def werr(s):
|
||||||
def wout(s):
|
def wout(s):
|
||||||
"""Write any string to stdout"""
|
"""Write any string to stdout"""
|
||||||
sys.stdout.write(any2u(s, sys.stdout))
|
sys.stdout.write(any2u(s, sys.stdout))
|
||||||
|
|
||||||
|
strutil_used = True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue