2240 Commits

Author SHA1 Message Date
Kovid Goyal
b54a0957e3
Replace use of atexit 2025-07-15 14:12:12 +05:30
Kovid Goyal
f83e15f7aa
Remove unused code 2025-07-15 14:08:49 +05:30
Kovid Goyal
abd93cd457
Workaround for the execrable qmake mistakenly thinking its setuid when run with uid==0 and euid!=0
Instead of dropping and regaining privileges, fork and run sub commands
in child with uid!=0
2025-07-15 14:07:21 +05:30
Kovid Goyal
f8deedd4c8
Use a static tmp dir for user manual builds 2025-06-20 10:28:23 +05:30
Kovid Goyal
4da88111a7
Dont build man page in Indonesian as sphinx fails for it 2025-04-18 08:44:00 +05:30
Kovid Goyal
6f63366c14
... 2025-04-11 17:29:01 +05:30
Kovid Goyal
5d6f454ab3
Add a check to prevent accidentally releasing a preview as the main release 2025-04-11 17:27:46 +05:30
un-pogaz
b0d58ade70 add 'code' dictionary to codespell setting 2025-03-23 16:02:05 +01:00
un-pogaz
d176b3a7cf add codespell to pyproject.toml
calibre will probably never fully compliant with codespell
this setting is only to easily find common typo errors
by filtring a great range of false-positives, but not all
2025-03-23 13:59:14 +01:00
Kovid Goyal
cd3d151e7e
Silence spurious warning 2025-03-15 08:39:01 +05:30
Kovid Goyal
464b68bd98
automatic fixes from ruf version 11 for spurious uses of int() 2025-03-15 08:38:07 +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
Kovid Goyal
ddd580c85c
Remove more exclusions 2025-01-27 10:26:01 +05:30
Kovid Goyal
f172c67706
./setup.py check now uses strict checking
No need to maintain two ruff configs. And strict checking happens in
editors/CI automatically, making my life a bit easier.

Remove the no longer needed --strict and --pep8 options from the check
command.
2025-01-26 10:35:19 +05:30
Kovid Goyal
c10832387d
Cleanup previous PR 2025-01-25 17:31:21 +05:30
un-pogaz
ac4fbfc7c9 implicit string concatenation (manual)
ruff 'ISC'
2025-01-24 11:14:25 +01:00
un-pogaz
ed2930712d various whitespace (extra-edit)
!partial 'E203,E222,E241,E271,E272'
2025-01-24 11:14:24 +01:00
un-pogaz
ddfdc80d3a more misc recomendation (manual)
ruff 'PIE'
2025-01-24 11:14:22 +01:00
un-pogaz
0b23eaf328 code indentation (extra-edit) 2025-01-24 11:14:21 +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
5540126765 uniform region (extra-edit) 2025-01-24 11:14:20 +01:00
un-pogaz
ac6912565a always use raw-string for regex (auto-fix)
ruff 'RUF039'
2025-01-24 11:14:20 +01:00
un-pogaz
8ba35b97b5 fix trailing comma (manual)
ruff 'COM818'
2025-01-24 11:14:19 +01:00
un-pogaz
cc172a2a48 unnecessary map (auto-fix)
ruff 'C417' --unsafe-fixes
2025-01-24 11:14:18 +01:00
un-pogaz
6c54a656ba write better list/set/dict comprehensions (auto-fix)
ruff 'C4'
2025-01-24 11:14:17 +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
12cb8b2e58 upgrade hidden print to Python 3 (extra-edit) 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
b5aca6ff5c uniform string quote (extra-edit) 2025-01-24 11:14:15 +01:00
un-pogaz
37771022ce uniform string quote (auto-fix)
ruff 'Q'
2025-01-24 11:14:14 +01:00
un-pogaz
05c9729698 add scoped noqa 'line too long' (extra-edit) 2025-01-24 11:14:10 +01:00
un-pogaz
7e1edf1fbf add scoped noqa 'line too long' (auto-fix)
ruff 'E501' --add-noqa
2025-01-24 11:14:10 +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
3e58252176
automated upgrade of python code using ruff and ./setup.py upgrade_source_code 2025-01-22 09:44:19 +05:30
Kovid Goyal
dd71135591
Bump minimum Python version to 3.10
3.8 is EOLed and 3.9 will be EOLed in a few months. 3.10 thus makes a
good base and matches the minimum Python version on my other big Python
project, kitty, so I dont have to keep multiple feature sets in mind
when developing.
2025-01-22 09:37:33 +05:30
Kovid Goyal
55469a6ab6
... 2025-01-14 10:03:00 +05:30
un-pogaz
74c535f624 setup check: common files walker 2025-01-13 19:39:25 +01:00
un-pogaz
c1f7c9dd95 add option --strict to 'setup.py check'
Perform the checking more strictely. See the file "ruff-strict-pep8.toml"
2025-01-13 19:38:41 +01:00
Kovid Goyal
fe7536dd2a
And now Ubuntu needs freetype-dev explicitly installed for some reason 2025-01-13 21:48:00 +05:30
Kovid Goyal
c7f2de3902
Ubuntu changed a package name. Sigh. 2025-01-13 21:32:30 +05:30
Kovid Goyal
89e88b9678
Cleanup previous PR 2024-12-17 19:22:09 +05:30
un-pogaz
2e935d394c add option --pep8 to 'setup.py check'
Automatically fix some of the smallest errors, then perform a pep8 commit
2024-12-17 12:59:26 +01:00
un-pogaz
6452ae7f9a improve output message with auto-fix 2024-12-17 11:03:10 +01:00
un-pogaz
e2156ec23d add option --fix to 'setup.py check'
Try to automatically fix some of the smallest errors
2024-12-15 13:17:48 +01:00
un-pogaz
21a524a513 safer setup.py check 2024-12-15 13:17:48 +01:00
Kovid Goyal
743c457c4b
Arch now packages kakasi 2024-12-15 09:49:23 +05:30
Kovid Goyal
bcfdfc1e1d
And yet more crap with pykakasi 2024-11-12 20:38:57 +05:30