Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Sep 25, 2024
1 parent 2443850 commit c4fd120
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
4 changes: 3 additions & 1 deletion recipes/afr.recipe
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env python
from calibre.web.feeds.news import BasicNewsRecipe
from datetime import date

from calibre.web.feeds.news import BasicNewsRecipe


def absurl(url):
if url.startswith('/'):
return 'https://www.afr.com' + url
Expand Down
3 changes: 2 additions & 1 deletion recipes/ifzm.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import json

from calibre.web.feeds.news import BasicNewsRecipe


def absurl(url):
if url.startswith('/'):
return 'https://www.infzm.com' + url
Expand Down Expand Up @@ -74,5 +75,5 @@ class infzm(BasicNewsRecipe):
return feeds

def populate_article_metadata(self, article, soup, first):
if soup.find(attrs={'class':'intro'}:
if soup.find(attrs={'class':'intro'}):
article.summary = article.text_summary = self.tag_to_string(soup.find(attrs={'class':'intro'}))
9 changes: 5 additions & 4 deletions recipes/irish_times_free.recipe
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env python
from calibre.web.feeds.news import BasicNewsRecipe, classes
from datetime import date

from calibre.web.feeds.news import BasicNewsRecipe, classes


def absurl(url):
if url.startswith('/'):
Expand Down Expand Up @@ -35,7 +36,7 @@ class IrishTimes(BasicNewsRecipe):
def get_cover_url(self):
from datetime import date
cover = 'https://img.kiosko.net/' + date.today().strftime('%Y/%m/%d') + '/ie/irish_times.750.jpg'
br = BasicNewsRecipe.get_browser(self, verify_ssl_certificates=False)
br = BasicNewsRecipe.get_browser(self, verify_ssl_certificates=False)
try:
br.open(cover)
except:
Expand Down Expand Up @@ -63,8 +64,8 @@ class IrishTimes(BasicNewsRecipe):
def parse_index(self):
index = 'https://www.irishtimes.com/'
sections = [
'ireland', 'world', 'opinion', 'politics', 'crime-law', 'culture', 'business',
'life-style', 'health', 'sport', 'property', 'food', 'abroad', 'environment',
'ireland', 'world', 'opinion', 'politics', 'crime-law', 'culture', 'business',
'life-style', 'health', 'sport', 'property', 'food', 'abroad', 'environment',
'obituaries'
]
feeds = []
Expand Down
1 change: 1 addition & 0 deletions recipes/live_law.recipe
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
from calibre.web.feeds.news import BasicNewsRecipe, classes


def absurl(url):
if url.startswith('/'):
return 'https://www.livelaw.in' + url
Expand Down
2 changes: 1 addition & 1 deletion src/calibre/gui2/library/alternate_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
from calibre import fit_image, human_readable, prepare_string_for_xml
from calibre.constants import DEBUG, config_dir, islinux
from calibre.ebooks.metadata import fmt_sidx, rating_to_stars
from calibre.gui2 import clip_border_radius, config, empty_index, gprefs, rating_font, is_dark_theme
from calibre.gui2 import clip_border_radius, config, empty_index, gprefs, rating_font
from calibre.gui2.dnd import path_from_qurl
from calibre.gui2.gestures import GestureManager
from calibre.gui2.library.caches import CoverCache, ThumbnailCache
Expand Down
2 changes: 1 addition & 1 deletion src/calibre/gui2/library/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from calibre.db.utils import force_to_bool
from calibre.ebooks.metadata import authors_to_string, fmt_sidx, string_to_authors
from calibre.ebooks.metadata.book.formatter import SafeFormat
from calibre.gui2 import error_dialog, simple_excepthook, is_dark_theme
from calibre.gui2 import error_dialog, is_dark_theme, simple_excepthook
from calibre.gui2.library import DEFAULT_SORT
from calibre.library.coloring import color_row_key
from calibre.library.save_to_disk import find_plugboard
Expand Down
3 changes: 1 addition & 2 deletions src/calibre/gui2/preferences/coloring.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@

from calibre import as_unicode, prepare_string_for_xml, sanitize_file_name
from calibre.constants import config_dir
from calibre.gui2 import (choose_files, choose_save_file, error_dialog, gprefs, info_dialog,
open_local_file, pixmap_to_data, question_dialog)
from calibre.gui2 import choose_files, choose_save_file, error_dialog, gprefs, info_dialog, open_local_file, pixmap_to_data, question_dialog
from calibre.gui2.dialogs.template_dialog import TemplateDialog
from calibre.gui2.metadata.single_download import RichTextDelegate
from calibre.gui2.preferences import ListViewWithMoveByKeyPress
Expand Down

0 comments on commit c4fd120

Please sign in to comment.