un-pogaz
072d8f2fec
unicode_type (regex)
...
unicode_type(
str(
2025-11-18 15:39:51 +01:00
un-pogaz
be25741c2b
string_or_bytes (regex)
...
isinstance\(([\w\.]+), string_or_bytes\)
isinstance(\1, (str, bytes))
replace string_or_bytes used on simple variables/attributs in a isinstance()
2025-11-18 15:39:51 +01:00
un-pogaz
0dc4e67529
repeated equality comparison (auto-fix)
...
ruff 'PLR1714' --unsafe-fixes
2025-10-10 08:24:40 +02:00
un-pogaz
9ef0ef4a8b
collapsible else if (auto-fix)
...
ruff 'PLR5501'
2025-10-10 08:24:40 +02:00
un-pogaz
6958965683
if min/max statement (extra-edit)
2025-10-10 08:24:40 +02:00
un-pogaz
69f1734e00
if min/max statement (auto-fix)
...
ruff 'PLR1730'
2025-10-10 08:24:40 +02:00
un-pogaz
3d5883a162
dict index missing items (manual)
...
ruff 'PLC0206'
2025-10-10 08:24:39 +02:00
un-pogaz
730ac72ee8
pep8: fix bare except
...
ruff 'E722'
2025-07-16 08:55:16 +02:00
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
59cd38256a
useless tuple (extra-edit)
2025-01-24 11:14:24 +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
41cee6f02d
various whitespace (auto-fix)
...
ruff 'E201,E202,E211,E251,E275'
2025-01-24 11:14:24 +01:00
un-pogaz
0ce6645f15
comment formating (extra-edit)
2025-01-24 11:14:21 +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
3720de10d2
always use raw-string for regex (manual)
...
ruff 'RUF039'
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
437c6bfc61
various trailing comma (extra-edit)
2025-01-24 11:14:19 +01:00
un-pogaz
4d7c180d8f
checks misuse of sys.version_info (manual)
...
ruff 'YTT'
2025-01-24 11:14:16 +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
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
Kovid Goyal
53b74283a4
sort imports in all python files
2024-03-30 13:02:22 +05:30
Kovid Goyal
ca1a05ce43
pep8
2023-11-06 07:51:40 +05:30
Kovid Goyal
fb262b7b57
Remove use of custom globals
2023-01-09 20:26:03 +05:30
Kovid Goyal
eb78a761a9
Automated upgrade of code to python 3.7+
...
Done by https://github.com/asottile/pyupgrade
Consists mainly of moving string formatting to f-strings and removing
encoding declarations
2022-01-08 11:47:40 +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
slowy07
125a5083a3
fix: fixing typo grammar
2021-08-02 07:54:49 +07:00
Kovid Goyal
0b386c3cc7
ODT Input: Fix a regression that broke conversion of ODT files with footnotes. Fixes #1898441 [Problem converting from .odt to .epub]( https://bugs.launchpad.net/calibre/+bug/1898441 )
2020-10-04 18:26:51 +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
YOKOTA Hiroshi
0c88f7507d
Replace ODF thumbnail icon
...
Icon image comes from LibreOffice.
Replace license tag to GPL-3.
2020-05-15 08:36:00 +09:00
Kovid Goyal
9d14bebafb
Fix str() and unicode_literals in odf package
2019-05-20 17:17:33 +05:30
Kovid Goyal
43c0b1216e
Fixes found by check
2019-05-20 16:56:45 +05:30
Kovid Goyal
8366df8637
Run code quality checks on the odf package
2019-05-20 16:52:16 +05:30
Kovid Goyal
609892eb81
Run autopep8 on odf2xhtml
2019-05-20 16:14:07 +05:30
Kovid Goyal
ed1571af6e
py3: remove has_key from odf2xhtml
2019-05-20 16:12:42 +05:30
Kovid Goyal
2d34c8a9ed
Fix regression 3.41.0 that broke ODT input
2019-04-19 16:24:04 +05:30
Kovid Goyal
b9a3e1952e
py3: misc fixes to make all module import
2019-04-04 15:15:51 +05:30
Kovid Goyal
9b3e525610
py3: Get rid of the last cStringIO
2019-04-01 18:42:25 +05:30
Kovid Goyal
0fcad5f21f
Fix various uses of iteritems missed by dict_fixes
2019-03-25 15:29:08 +05:30
Eli Schwartz
373f300ed7
Fix syntax error introduced while getting rid of basestring
2019-03-14 01:53:52 -04:00
Kovid Goyal
d1e30dfcac
Get rid of some xrange
2019-03-13 15:34:10 +05:30
Kovid Goyal
55151a3cdd
Get rid of basestring
2019-03-13 14:57:26 +05:30
Kovid Goyal
2d21a8efa2
Some more fixes for the unicode type
...
Now replaced in all dynamically loaded code. Recipes/metadata
sources/etc. In the case of recipes, since they get compiled by calibre
we simply make the unicode/unichr names available, no need for any
changes to the actual recipes themselves.
2019-03-13 12:04:47 +05:30
Flaviu Tamas
655ab21b0b
Fix from __future__ import order
2018-09-10 12:11:29 +05:30