1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 06:37:17 +00:00

Added tox configuration

... and fixed pep8 warnings. There's a lot of them that are still
ignored, but that's because it's too much of a step to take at once.
This commit is contained in:
Virgil Dupras
2014-10-13 15:08:59 -04:00
parent 24643a9b5d
commit 2166a0996c
46 changed files with 794 additions and 612 deletions

View File

@@ -1,12 +1,12 @@
# Created By: Virgil Dupras
# Created On: 2009-05-10
# Copyright 2014 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
from ._block_qt import getblocks
from ._block_qt import getblocks # NOQA
# Converted to C
# def getblock(image):
@@ -24,7 +24,7 @@ from ._block_qt import getblocks
# return (red // pixel_count, green // pixel_count, blue // pixel_count)
# else:
# return (0, 0, 0)
#
#
# def getblocks(image, block_count_per_side):
# width = image.width()
# height = image.height()

View File

@@ -1,9 +1,9 @@
# Created By: Virgil Dupras
# Created On: 2009-04-29
# Copyright 2014 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
import sys
@@ -25,9 +25,9 @@ SCAN_TYPE_ORDER = [
class PreferencesDialog(PreferencesDialogBase):
def __init__(self, parent, app):
PreferencesDialogBase.__init__(self, parent, app)
self.scanTypeComboBox.currentIndexChanged[int].connect(self.scanTypeChanged)
def _setupPreferenceWidgets(self):
scanTypeLabels = [
tr("Contents"),
@@ -49,25 +49,25 @@ class PreferencesDialog(PreferencesDialogBase):
self._setupAddCheckbox('debugModeBox', tr("Debug mode (restart required)"))
self.widgetsVLayout.addWidget(self.debugModeBox)
self._setupBottomPart()
def _load(self, prefs, setchecked):
scan_type_index = SCAN_TYPE_ORDER.index(prefs.scan_type)
self.scanTypeComboBox.setCurrentIndex(scan_type_index)
setchecked(self.matchScaledBox, prefs.match_scaled)
def _save(self, prefs, ischecked):
prefs.scan_type = SCAN_TYPE_ORDER[self.scanTypeComboBox.currentIndex()]
prefs.match_scaled = ischecked(self.matchScaledBox)
def resetToDefaults(self):
self.load(preferences.Preferences())
#--- Events
def scanTypeChanged(self, index):
scan_type = SCAN_TYPE_ORDER[self.scanTypeComboBox.currentIndex()]
fuzzy_scan = scan_type == ScanType.FuzzyBlock
self.filterHardnessSlider.setEnabled(fuzzy_scan)
if __name__ == '__main__':
from ..testapp import TestApp
@@ -75,4 +75,5 @@ if __name__ == '__main__':
dgapp = TestApp()
dialog = PreferencesDialog(None, dgapp)
dialog.show()
sys.exit(app.exec_())
sys.exit(app.exec_())

View File

@@ -1,8 +1,8 @@
# Created On: 2011-11-27
# Copyright 2014 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
#
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/bsd_license
from qtlib.column import Column
@@ -20,4 +20,5 @@ class ResultsModel(ResultsModelBase):
Column('mtime', defaultWidth=120),
Column('percentage', defaultWidth=60),
Column('dupe_count', defaultWidth=80),
]
]