Timmy Welch
e10f7dd7a7
Code cleanup
...
Remove no longer used google scripts
Remove convenience files from comicataggerlib and import comicapi directly
Add type-hints to facilitate auto-complete tools
Make PyQt5 code more compatible with PyQt6
Implement automatic tooling
isort and black for code formatting
Line length has been set to 120
flake8 for code standards with exceptions:
E203 - Whitespace before ':' - format compatiblity with black
E501 - Line too long - flake8 line limit cannot be set
E722 - Do not use bare except - fixing bare except statements is a
lot of overhead and there are already
many in the codebase
These changes, along with some manual fixes creates much more readable code.
See examples below:
diff --git a/comicapi/comet.py b/comicapi/comet.py
index d1741c5..52dc195 100644
--- a/comicapi/comet.py
+++ b/comicapi/comet.py
@@ -166,7 +166,2 @@ class CoMet:
- if credit['role'].lower() in set(self.editor_synonyms):
- ET.SubElement(
- root,
- 'editor').text = "{0}".format(
- credit['person'])
@@ -174,2 +169,4 @@ class CoMet:
self.indent(root)
+ if credit["role"].lower() in set(self.editor_synonyms):
+ ET.SubElement(root, "editor").text = str(credit["person"])
diff --git a/comictaggerlib/autotagmatchwindow.py b/comictaggerlib/autotagmatchwindow.py
index 4338176..9219f01 100644
--- a/comictaggerlib/autotagmatchwindow.py
+++ b/comictaggerlib/autotagmatchwindow.py
@@ -63,4 +63,3 @@ class AutoTagMatchWindow(QtWidgets.QDialog):
self.skipButton, QtWidgets.QDialogButtonBox.ActionRole)
- self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setText(
- "Accept and Write Tags")
+ self.buttonBox.button(QtWidgets.QDialogButtonBox.StandardButton.Ok).setText("Accept and Write Tags")
diff --git a/comictaggerlib/cli.py b/comictaggerlib/cli.py
index 688907d..dbd0c2e 100644
--- a/comictaggerlib/cli.py
+++ b/comictaggerlib/cli.py
@@ -293,7 +293,3 @@ def process_file_cli(filename, opts, settings, match_results):
if opts.raw:
- print((
- "{0}".format(
- str(
- ca.readRawCIX(),
- errors='ignore'))))
+ print(ca.read_raw_cix())
else:
2022-04-02 14:21:37 -07:00
fcanc
d959ac0401
Huge code cleanup
...
- `autopep8 -aa` for general cleanup;
- Changed order of imports, they should be ordered into 3 groups:
1. standard library imports;
2. 3rd party packages;
3. project imports.
- I commented various imports that were reported as unused by my IDE.
If everything goes fine we can consider to delete them;
- The Apache license disclaimers are now comments since triple-quotes
should be used only for docstrings;
- Fix - `utils.centerWindowOnParent` did not resolve, changed to
`centerWindowOnParent`
2015-02-22 03:30:32 +01:00
beville@gmail.com
68002daffa
bumped version number
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@713 6c5673fe-1810-88d6-992b-cd32ca31540c
2014-04-09 04:02:13 +00:00
beville@gmail.com
1405d9ff0e
more process tweaks
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@692 6c5673fe-1810-88d6-992b-cd32ca31540c
2014-03-23 22:28:50 +00:00
beville@gmail.com
3eca25db34
changed build checklist
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@688 6c5673fe-1810-88d6-992b-cd32ca31540c
2014-03-23 21:39:16 +00:00
beville@gmail.com
afbbc9d00c
git-svn-id: http://comictagger.googlecode.com/svn/trunk@667 6c5673fe-1810-88d6-992b-cd32ca31540c
2014-03-23 17:48:59 +00:00
beville
afcbde7fc6
update todo
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@651 6c5673fe-1810-88d6-992b-cd32ca31540c
2014-01-31 04:45:15 +00:00
beville@gmail.com
3dd3980bc1
update todo file
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@645 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-08-18 18:01:01 +00:00
beville@gmail.com
acc253d35c
todo update
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@630 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-05-06 18:36:30 +00:00
beville@gmail.com
39990fc2b4
Updated todo and release notes
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@599 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-04-12 17:56:15 +00:00
beville@gmail.com
76e6666a79
Tweaks for dealing with unicode issue "number"
...
Updated release_notes
git-svn-id: http://comictagger.googlecode.com/svn/trunk@563 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-03-30 16:31:56 +00:00
beville@gmail.com
56c1f8582a
todo update
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@554 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-03-27 19:35:41 +00:00
beville
58f5f10c78
abandoned debian build for now.
...
cleaned up the windows makefile a bit
git-svn-id: http://comictagger.googlecode.com/svn/trunk@469 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-08 05:38:14 +00:00
beville
2ade08aa89
Bumped version
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@434 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-06 05:59:08 +00:00
beville@gmail.com
4f3e63db07
Make a lot of print statements go to stderr
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@427 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-05 22:27:35 +00:00
beville
b8893b853f
Release notes update
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@426 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-05 06:42:24 +00:00
beville
dde1913e07
Font tweaks
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@421 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-05 04:49:44 +00:00
beville
320ee1c5d1
Updated todo
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@403 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-02-04 05:14:29 +00:00
beville@gmail.com
d9abc364f1
Version bump
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@382 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-31 01:14:21 +00:00
beville@gmail.com
df3544e734
Make sure the page list is populated even if it's not in the existing metadata
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@362 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-28 20:59:08 +00:00
beville
53aca0ee08
version bump
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@354 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-25 17:21:36 +00:00
beville@gmail.com
79a9cf1b40
Release 1.0.1
...
Fixed stupid bug where unicode can't be printed to OS X console
git-svn-id: http://comictagger.googlecode.com/svn/trunk@341 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-24 04:22:37 +00:00
beville@gmail.com
c44c240eef
UI tweaks
...
New icons
bumped version number
git-svn-id: http://comictagger.googlecode.com/svn/trunk@332 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-23 22:05:38 +00:00
beville
4143ca3314
Added a dialog for manually matching after auto-tag
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@327 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-23 05:25:50 +00:00
beville@gmail.com
37048b99fc
Assorted fixes and enhancements
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@325 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-23 01:25:17 +00:00
beville
221923607a
Auto-Tag progress window added
...
More auto-tag and other stuff
git-svn-id: http://comictagger.googlecode.com/svn/trunk@322 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-22 04:09:08 +00:00
beville
b8e8c6433a
Options dialog for export to zip
...
Fixed progress dialogs
git-svn-id: http://comictagger.googlecode.com/svn/trunk@320 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-21 06:39:44 +00:00
beville@gmail.com
f2b1db5479
Added batch tag copy
...
Other fixed for batch stuff
git-svn-id: http://comictagger.googlecode.com/svn/trunk@317 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-20 20:43:48 +00:00
beville
97dc36b8fb
Implemented batch export to zip
...
more multi-file/batch enhancements
git-svn-id: http://comictagger.googlecode.com/svn/trunk@315 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-20 08:36:21 +00:00
beville
d58e033689
Implemented batch tag remove
...
more multi-file/batch enhancements
git-svn-id: http://comictagger.googlecode.com/svn/trunk@314 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-19 06:15:33 +00:00
beville
c3d5d44788
Implemented batch rename in GUI
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@312 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-19 03:12:25 +00:00
beville@gmail.com
2bf9b9ed7c
Completed initial multi-file management, before implementing batch features
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@311 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-18 21:12:23 +00:00
beville
7a7adc1c3f
Implemented context menu for file list
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@309 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-17 06:19:06 +00:00
beville@gmail.com
41f730a558
Version update for 0.9.5
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@305 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-17 00:05:09 +00:00
beville
4ea56c0bd0
Updated version and release notes
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@296 6c5673fe-1810-88d6-992b-cd32ca31540c
2013-01-07 21:20:36 +00:00
beville
8a5430c83e
updated todo
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@278 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-19 05:07:14 +00:00
beville
a602c42f0e
new file renamer class
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@263 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-15 05:54:12 +00:00
beville@gmail.com
3f1868222d
Updated version and release notes
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@251 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-12 01:14:25 +00:00
beville@gmail.com
e6f63beee2
Updated todo
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@225 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-12-05 22:17:56 +00:00
beville
265ff0e3a7
todo config mgmt notes
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@176 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-30 05:46:17 +00:00
beville
e776d2fd3b
Added actual file renaming
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@167 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-30 03:21:05 +00:00
beville@gmail.com
c445cdddd9
Lots of lil fixes
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@166 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-30 02:14:06 +00:00
beville@gmail.com
7838710ed4
Added network communication exception handling
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@114 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-28 20:15:20 +00:00
beville@gmail.com
2c205a8488
todo update
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@89 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-26 14:49:04 +00:00
beville@gmail.com
5eb37200cd
Command-line credit parsing
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@88 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-26 04:09:11 +00:00
beville@gmail.com
d05fade731
Made sure basedir is always absolute
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@87 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-24 18:34:49 +00:00
beville@gmail.com
9ecb67e3a6
Got settings reset working
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@86 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-24 18:17:35 +00:00
beville@gmail.com
3d7953fe2c
Removed the pages tab (for now)
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@81 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-23 22:18:43 +00:00
beville@gmail.com
2b29f9f57b
Tweaked the OptionalMessageDialog usage
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@80 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-23 22:05:56 +00:00
beville@gmail.com
a60410c887
test
...
git-svn-id: http://comictagger.googlecode.com/svn/trunk@79 6c5673fe-1810-88d6-992b-cd32ca31540c
2012-11-22 17:23:53 +00:00