mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Passed mfxutil thru flake8.
See https://github.com/shlomif/PySolFC/issues/61#issuecomment-374283730 - thanks!
This commit is contained in:
parent
a68546f7a2
commit
74d3a4d9db
2 changed files with 18 additions and 18 deletions
|
@ -38,17 +38,17 @@ Image = ImageTk = ImageOps = None
|
|||
if TOOLKIT == 'tk':
|
||||
try: # PIL
|
||||
from PIL import Image
|
||||
from PIL import ImageTk
|
||||
from PIL import ImageOps
|
||||
from PIL import ImageTk # noqa: F401
|
||||
from PIL import ImageOps # noqa: F401
|
||||
except ImportError:
|
||||
Image = None
|
||||
else:
|
||||
# for py2exe
|
||||
from PIL import GifImagePlugin
|
||||
from PIL import PngImagePlugin
|
||||
from PIL import JpegImagePlugin
|
||||
from PIL import BmpImagePlugin
|
||||
from PIL import PpmImagePlugin
|
||||
from PIL import GifImagePlugin # noqa: F401
|
||||
from PIL import PngImagePlugin # noqa: F401
|
||||
from PIL import JpegImagePlugin # noqa: F401
|
||||
from PIL import BmpImagePlugin # noqa: F401
|
||||
from PIL import PpmImagePlugin # noqa: F401
|
||||
Image._initialized = 2
|
||||
USE_PIL = False
|
||||
if TOOLKIT == 'tk' and Image and Image.VERSION >= '1.1.7':
|
||||
|
@ -81,11 +81,11 @@ def latin1_to_ascii(n):
|
|||
n = n.encode('iso8859-1', 'replace')
|
||||
# FIXME: rewrite this for better speed
|
||||
return (n.replace("\xc4", "Ae")
|
||||
.replace("\xd6", "Oe")
|
||||
.replace("\xdc", "Ue")
|
||||
.replace("\xe4", "ae")
|
||||
.replace("\xf6", "oe")
|
||||
.replace("\xfc", "ue"))
|
||||
.replace("\xd6", "Oe")
|
||||
.replace("\xdc", "Ue")
|
||||
.replace("\xe4", "ae")
|
||||
.replace("\xf6", "oe")
|
||||
.replace("\xfc", "ue"))
|
||||
|
||||
|
||||
def latin1_normalize(n):
|
||||
|
@ -131,10 +131,10 @@ def getusername():
|
|||
def getprefdir(package):
|
||||
|
||||
if (TOOLKIT == 'kivy'):
|
||||
from pysollib.kivy.LApp import get_platform
|
||||
plat = get_platform()
|
||||
if plat == 'android':
|
||||
os.environ['HOME'] = '/sdcard'
|
||||
from pysollib.kivy.LApp import get_platform
|
||||
plat = get_platform()
|
||||
if plat == 'android':
|
||||
os.environ['HOME'] = '/sdcard'
|
||||
|
||||
if os.name == "nt":
|
||||
return win32_getprefdir(package)
|
||||
|
@ -184,7 +184,8 @@ def win32_getprefdir(package):
|
|||
# ************************************************************************
|
||||
|
||||
def destruct(obj):
|
||||
if TOOLKIT=='kivy': return
|
||||
if TOOLKIT == 'kivy':
|
||||
return
|
||||
|
||||
# assist in breaking circular references
|
||||
if obj is not None:
|
||||
|
|
|
@ -26,7 +26,6 @@ my %skip = (
|
|||
pysollib/games/mahjongg/__init__.py
|
||||
pysollib/games/special/__init__.py
|
||||
pysollib/games/ultra/__init__.py
|
||||
pysollib/mfxutil.py
|
||||
pysollib/pysoltk.py
|
||||
pysollib/tile/ttk.py
|
||||
pysollib/ui/tktile/Canvas2.py
|
||||
|
|
Loading…
Add table
Reference in a new issue