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
Kovid Goyal
04d5728ef9
More work on de-vendoring pykakasi
2024-11-12 19:52:31 +05:30
Kovid Goyal
7fee97c627
Windows: Enable popup OS notifications even when system tray icon is disabled
...
Dont go through Qt's horrible system tray based notifier which in turn
goes through the legacy Shell_NotifyIcon API. Instead talk
to the underlying windows toast notification API directly.
2024-11-08 21:28:37 +05:30
Zbigniew Jędrzejewski-Szmek
f51b20e5d9
build: sort headers and sources in plugin builds
...
I'd observe a difference in the debuginfo data for the plugins in rebuilds.
Various /usr/lib64/calibre/calibre/plugins/*.so files would be different, but
the source of the difference was in the link to debuginfo data, which in turn
appears to be caused by differences in sort order in various tables, caused by
the object files being listed in different order. setup/build.py writes out
pyproject.toml, which is turned into *.pro, which is turned into a Makefile.
Sorting the object files by name seems to fix this particular issue. This
makes local rebuilds reproducible for me.
2024-10-21 13:57:19 +02:00
Zbigniew Jędrzejewski-Szmek
5a85a0e167
build: sort objects in link commands
...
Build logs are easier to compare if the commands don't change. This
shouldn't have any effect on the build result.
2024-10-21 13:57:19 +02:00
Kovid Goyal
c038886a42
Add ffmpeg lib path for tests on CI
2024-10-11 22:15:02 +05:30
Kovid Goyal
2fc7f252ef
Work on function for transcoding of audio stream
2024-10-11 21:00:45 +05:30
Kovid Goyal
3792654953
...
2024-10-09 20:35:44 +05:30