Commit Graph

65 Commits

Author SHA1 Message Date
Kovid Goyal 1f69ab8701 Make CodeQL happy
None of these are actual issues, as is usual for CodeQL
2025-09-15 13:16:19 +05:30
Kovid Goyal 2431f1f47c ... 2025-08-21 10:39:25 +05:30
Kovid Goyal 20afcedbd8 Also retrieve plugin category when mirroring plugins 2025-08-21 10:37:09 +05:30
Kovid Goyal 5c7dc9613b Automated conversion of % format specifiers
Using ruff. Does not change any translatable strings.
There are still several thousand usages of % left that ruff wont
auto-convert. Get to them someday.
2025-01-27 10:58:48 +05:30
un-pogaz ed2930712d various whitespace (extra-edit)
!partial 'E203,E222,E241,E271,E272'
2025-01-24 11:14:24 +01:00
un-pogaz 8d28380515 add/remove blank-line (extra-edit)
ruff 'E302,E303,E304,E305,W391'
2025-01-24 11:14:21 +01:00
un-pogaz 19994000c9 use f-string instead of format call (extra-edit)
ruff 'UP030,UP032' --extend-exclude "src/calibre/*" !partial
2025-01-24 11:14:16 +01:00
un-pogaz 02854d8b8c convert some legacy percent format (extra-edit) 2025-01-24 11:14:16 +01:00
un-pogaz 047ebcffe4 convert some legacy percent format (manual)
ruff 'UP031'
2025-01-24 11:14:16 +01:00
un-pogaz 0560b429bf convert some legacy percent format (auto-fix)
ruff 'UP031'
2025-01-24 11:14:16 +01:00
un-pogaz e0022f21cf upgrade code to Python 3 (extra-edit) 2025-01-24 11:14:16 +01:00
un-pogaz 37771022ce uniform string quote (auto-fix)
ruff 'Q'
2025-01-24 11:14:14 +01:00
un-pogaz a73c48720e remove unscoped noqa (extra-edit)
regex: \s*#\s*noqa\n
2025-01-24 11:14:10 +01:00
Kovid Goyal 53b74283a4 sort imports in all python files 2024-03-30 13:02:22 +05:30
Ori Avtalion 8c4e937dc8 Remove deprecated utcnow, utcfromtimestamp 2023-11-16 22:45:56 +02:00
Kovid Goyal d7c31f4a81 Automated fixes from ruff 2023-01-09 18:13:56 +05:30
Kovid Goyal 24c460faec also upgrade code in setup folder 2022-01-08 12:15:18 +05:30
Zbigniew Jędrzejewski-Szmek 9d63b6ae56 Drop (object) from class definitions
Python2 had old-style classes (no "(object)"), and new style classes (with
"object"). Under Py3 this is a noop, so let's drop it to make the code
a bit shorter.
2021-09-30 09:23:56 +02:00
Kovid Goyal ddd56f5c47 Cleanup plugins_mirror.py 2021-07-19 12:00:04 +05:30
Kovid Goyal 2003641a98 Have plugins mirror run under python 3 and use python2 only for plugins that dont parse under python3 2021-07-19 11:29:40 +05:30
Kovid Goyal 59e471503e Remove history indication from plugins index 2020-11-25 21:18:03 +05:30
Kovid Goyal 3dbbe1397e Remove code to check for Qt5 incompatibility in plugins
The Qt 5 transition is done and dusted now. The ones that arent going to
be ported will anyway need to be ported to Python 3 as well, which is
also never going to happen.
2020-11-25 13:06:00 +05:30
Kovid Goyal 72308168ef Support for the new in python 3.8 Constant ast node 2020-11-25 12:55:38 +05:30
Kovid Goyal a6b4ceff58 Need the future imports for plugins parsing while it is done with python2 2020-08-23 12:19:52 +05:30
Kovid Goyal 9ff27782de Remove useless __future__ imports
Not needed on python3
2020-08-22 18:47:55 +05:30
Kovid Goyal 29cd8d64ea Change shebangs to python from python2
Also remove a few other miscellaneous references to python2
2020-08-22 18:47:51 +05:30
Kovid Goyal 32438d1565 Handle reading version info from jgoguens updated plugins
The version info is now specified as an attribute of a module, import.
2020-06-17 08:55:46 +05:30
Kovid Goyal 449672bab1 Make plugins_mirror.py more polyglot 2020-02-10 20:41:23 +05:30
Kovid Goyal 167cb89dc7 ... 2019-10-28 08:08:00 +05:30
Kovid Goyal f4cf168a72 plugins_mirror should not rely on getcwdu 2019-04-23 10:34:37 +05:30
Kovid Goyal e73dbb0f99 py3: Port calls to json.dump() 2019-03-31 18:30:59 +05:30
Kovid Goyal 6d3fcc853e Cant use polyglot in plugins_mirror 2019-03-25 17:54:42 +05:30
Eli Schwartz 4f545af415 autopep8 2019-03-24 01:18:27 -04:00
Eli Schwartz a623717d96 python3: apply various fixes from python-modernize "dict_six"
Imports were then fixed and consolidated to derive from the internal
polyglot.builtins
2019-03-24 01:18:27 -04:00
Kovid Goyal be00d40d02 plugins_mirror cannot depend on polyglot 2018-09-10 21:04:25 +05:30
Kovid Goyal 5234e43f0e Port future_builtins to polyglot 2018-09-10 20:12:01 +05:30
Kovid Goyal 5697f8f282 More robust timeout retry handling 2018-02-02 15:43:55 +05:30
Kovid Goyal 3dfd846b7b Retry after sleeping on URL fetch timeout in plugins mirror script 2018-02-02 13:14:04 +05:30
Kovid Goyal 594c52a7af Double plugin mirror download timeout 2018-02-01 13:06:34 +05:30
Kovid Goyal 8e6fbc1448 Load plugin index over https from mobileread now that mobileread supports https 2017-01-08 20:37:19 +05:30
Kovid Goyal e4521c7270 ... 2017-01-08 17:07:24 +05:30
Kovid Goyal f8c1dd46bb Fix detection of plugin data for the amazon multiple countries plugin 2016-11-06 17:14:44 +05:30
Kovid Goyal e2e93a3a74 ... 2016-01-19 00:26:31 +05:30
Kovid Goyal cad0f939cb Self host plugin icon 2016-01-10 14:17:15 +05:30
Kovid Goyal 5a24f7f51b Avoid mixed content warnings when referring to resources on the calibre website 2016-01-08 15:57:20 +05:30
Kovid Goyal 77051cf145 ... 2016-01-07 15:49:25 +05:30
Kovid Goyal 5a792a0d6a ... 2016-01-07 15:25:30 +05:30
Kovid Goyal 9c582259be ... 2016-01-07 15:17:35 +05:30
Kovid Goyal e0871ec10d ... 2016-01-07 15:06:18 +05:30
Kovid Goyal 9daaa81437 Fix detection of plugin class in the KePub metadata plugins 2015-05-26 21:34:41 +05:30