Reorder imports (PEP-8)

This commit is contained in:
Hugo Posnic 2019-02-21 16:25:15 +01:00
parent 1ecff8b3d9
commit fa94b546fb
2 changed files with 8 additions and 10 deletions

View file

@ -3,26 +3,22 @@
import time import time
import sys import sys
import errno import errno
from os import listdir from os import listdir, path, remove, access, W_OK
from os import path
from os import remove
from os import access
from os import W_OK as WRITEABLE
from shutil import copy from shutil import copy
from subprocess import call, PIPE from subprocess import call, PIPE
from optparse import OptionParser from optparse import OptionParser
from multiprocessing import cpu_count
from queue import Queue
from PyQt5.QtCore import * from PyQt5.QtCore import *
from PyQt5.QtGui import * from PyQt5.QtGui import *
from PyQt5.QtWidgets import * from PyQt5.QtWidgets import *
from tools import human_readable_size from tools import human_readable_size
from queue import Queue
from ThreadPool import ThreadPool from ThreadPool import ThreadPool
from multiprocessing import cpu_count
from ui import Ui_trimage from ui import Ui_trimage
VERSION = "1.0.5" VERSION = "1.0.5"
@ -397,7 +393,7 @@ class Image:
self.valid = False self.valid = False
self.reset() self.reset()
self.fullpath = fullpath self.fullpath = fullpath
if path.isfile(self.fullpath) and access(self.fullpath, WRITEABLE): if path.isfile(self.fullpath) and access(self.fullpath, W_OK):
self.filetype = path.splitext(self.fullpath)[1][1:] self.filetype = path.splitext(self.fullpath)[1][1:]
if self.filetype == "jpg": if self.filetype == "jpg":
self.filetype = "jpeg" self.filetype = "jpeg"

View file

@ -1,9 +1,11 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from os import path
from PyQt5.QtCore import * from PyQt5.QtCore import *
from PyQt5.QtGui import * from PyQt5.QtGui import *
from PyQt5.QtWidgets import * from PyQt5.QtWidgets import *
from os import path
class TrimageTableView(QTableView): class TrimageTableView(QTableView):