Skip to content

Commit

Permalink
Merge branch 'make-check-strict-happy' of https://github.com/un-pogaz…
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Jan 26, 2025
2 parents 5a0e9aa + 73828a5 commit 90a97ca
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion recipes/wsj.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class WSJ(BasicNewsRecipe):
br.addheaders += [
('Accept-Encoding', 'gzip'),
('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

Expand Down
2 changes: 1 addition & 1 deletion recipes/wsj_mag.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class WSJ(BasicNewsRecipe):
br.addheaders += [
('Accept-Encoding', 'gzip'),
('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

Expand Down
2 changes: 1 addition & 1 deletion recipes/wsj_news.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class WSJ(BasicNewsRecipe):
br.addheaders += [
('Accept-Encoding', 'gzip'),
('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

Expand Down
1 change: 1 addition & 0 deletions ruff-strict-pep8.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ unfixable = ['PIE794', 'ISC001']
[lint.per-file-ignores]
"recipes/*" = ['UP']
"manual/plugin_examples/*" = ['UP']
"setup/changelog.py" = ['ISC001']
"setup/commands.py" = ['RUF022']
"src/calibre/*" = ['UP031']
"src/calibre/customize/__init__.py" = ['RET501']
Expand Down
2 changes: 1 addition & 1 deletion src/calibre/ebooks/conversion/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def chapter_head(self, match):
return '<h2>'+chap+'</h2>\n'
else:
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_title = delete_quotes.sub('', delete_whitespace.sub(r'\g<c>', html2text(title)))
self.html_preprocess_sections = self.html_preprocess_sections + 1
Expand Down

0 comments on commit 90a97ca

Please sign in to comment.