Merge branch 'make-check-strict-happy' of https://github.com/un-pogaz/calibre

This commit is contained in:
Kovid Goyal 2025-01-26 10:10:15 +05:30
commit 90a97caa3b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
5 changed files with 5 additions and 4 deletions

View File

@ -143,7 +143,7 @@ class WSJ(BasicNewsRecipe):
br.addheaders += [ br.addheaders += [
('Accept-Encoding', 'gzip'), ('Accept-Encoding', 'gzip'),
('cache-control', 'no-cache'), ('cache-control', 'no-cache'),
('x-api-key', ('e''b''2''4''0''8''c''d''2''7''f''8''9''1''3''d''4''2''1''f''a''3''d''5''c''3''d''0''7''c''c''f''0''3''4''c''b''4''4''8')), ('x-api-key', ('e''b''2''4''0''8''c''d''2''7''f''8''9''1''3''d''4''2''1''f''a''3''d''5''c''3''d''0''7''c''c''f''0''3''4''c''b''4''4''8')), # noqa: ISC001
] ]
return br return br

View File

@ -118,7 +118,7 @@ class WSJ(BasicNewsRecipe):
br.addheaders += [ br.addheaders += [
('Accept-Encoding', 'gzip'), ('Accept-Encoding', 'gzip'),
('cache-control', 'no-cache'), ('cache-control', 'no-cache'),
('x-api-key', ('e''b''2''4''0''8''c''d''2''7''f''8''9''1''3''d''4''2''1''f''a''3''d''5''c''3''d''0''7''c''c''f''0''3''4''c''b''4''4''8')), ('x-api-key', ('e''b''2''4''0''8''c''d''2''7''f''8''9''1''3''d''4''2''1''f''a''3''d''5''c''3''d''0''7''c''c''f''0''3''4''c''b''4''4''8')), # noqa: ISC001
] ]
return br return br

View File

@ -151,7 +151,7 @@ class WSJ(BasicNewsRecipe):
br.addheaders += [ br.addheaders += [
('Accept-Encoding', 'gzip'), ('Accept-Encoding', 'gzip'),
('cache-control', 'no-cache'), ('cache-control', 'no-cache'),
('x-api-key', ('e''b''2''4''0''8''c''d''2''7''f''8''9''1''3''d''4''2''1''f''a''3''d''5''c''3''d''0''7''c''c''f''0''3''4''c''b''4''4''8')), ('x-api-key', ('e''b''2''4''0''8''c''d''2''7''f''8''9''1''3''d''4''2''1''f''a''3''d''5''c''3''d''0''7''c''c''f''0''3''4''c''b''4''4''8')), # noqa: ISC001
] ]
return br return br

View File

@ -47,6 +47,7 @@ unfixable = ['PIE794', 'ISC001']
[lint.per-file-ignores] [lint.per-file-ignores]
"recipes/*" = ['UP'] "recipes/*" = ['UP']
"manual/plugin_examples/*" = ['UP'] "manual/plugin_examples/*" = ['UP']
"setup/changelog.py" = ['ISC001']
"setup/commands.py" = ['RUF022'] "setup/commands.py" = ['RUF022']
"src/calibre/*" = ['UP031'] "src/calibre/*" = ['UP031']
"src/calibre/customize/__init__.py" = ['RET501'] "src/calibre/customize/__init__.py" = ['RET501']

View File

@ -58,7 +58,7 @@ class HeuristicProcessor:
return '<h2>'+chap+'</h2>\n' return '<h2>'+chap+'</h2>\n'
else: else:
delete_whitespace = re.compile(r'^\s*(?P<c>.*?)\s*$') delete_whitespace = re.compile(r'^\s*(?P<c>.*?)\s*$')
delete_quotes = re.compile(''''"''') delete_quotes = re.compile(''''"''') # noqa: RUF039
txt_chap = delete_quotes.sub('', delete_whitespace.sub(r'\g<c>', html2text(chap))) txt_chap = delete_quotes.sub('', delete_whitespace.sub(r'\g<c>', html2text(chap)))
txt_title = delete_quotes.sub('', delete_whitespace.sub(r'\g<c>', html2text(title))) txt_title = delete_quotes.sub('', delete_whitespace.sub(r'\g<c>', html2text(title)))
self.html_preprocess_sections = self.html_preprocess_sections + 1 self.html_preprocess_sections = self.html_preprocess_sections + 1