mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix a few minor nits
- Add missing args in format strings - Add missing `self` or `cls` param - Use new style class in one location where it makes sense
This commit is contained in:
parent
043c5cbfe5
commit
14c6a84f16
@ -12,7 +12,7 @@ from calibre.constants import islinux
|
|||||||
from calibre.utils.icu import sort_key, strcmp
|
from calibre.utils.icu import sort_key, strcmp
|
||||||
|
|
||||||
|
|
||||||
class Item:
|
class Item(object):
|
||||||
|
|
||||||
def __init__(self, name, label, index, icon, exists):
|
def __init__(self, name, label, index, icon, exists):
|
||||||
self.name = name
|
self.name = name
|
||||||
@ -22,7 +22,7 @@ class Item:
|
|||||||
self.exists = exists
|
self.exists = exists
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return 'name=%s, label=%s, index=%s, exists='%(self.name, self.label, self.index, self.exists)
|
return 'name=%s, label=%s, index=%s, exists=%s'%(self.name, self.label, self.index, self.exists)
|
||||||
|
|
||||||
|
|
||||||
class TagCategories(QDialog, Ui_TagCategories):
|
class TagCategories(QDialog, Ui_TagCategories):
|
||||||
|
@ -475,7 +475,7 @@ def books_in(ctx, rd, encoded_category, encoded_item, library_id):
|
|||||||
try:
|
try:
|
||||||
dname, ditem = map(decode_name, (encoded_category, encoded_item))
|
dname, ditem = map(decode_name, (encoded_category, encoded_item))
|
||||||
except:
|
except:
|
||||||
raise HTTPNotFound('Invalid encoded param: %r' % (encoded_category, encoded_item))
|
raise HTTPNotFound('Invalid encoded param: %r (%r)' % (encoded_category, encoded_item))
|
||||||
num, offset = get_pagination(rd.query)
|
num, offset = get_pagination(rd.query)
|
||||||
sort, sort_order = rd.query.get('sort', 'title'), rd.query.get('sort_order')
|
sort, sort_order = rd.query.get('sort', 'title'), rd.query.get('sort_order')
|
||||||
sort_order = ensure_val(sort_order, 'asc', 'desc')
|
sort_order = ensure_val(sort_order, 'asc', 'desc')
|
||||||
|
@ -71,7 +71,7 @@ def digest(un, pw, nonce=None, uri=None, method='GET', nc=1, qop='auth', realm=R
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.method = method
|
self.method = method
|
||||||
|
|
||||||
def peek():
|
def peek(self):
|
||||||
return body
|
return body
|
||||||
response = da.request_digest(pw, Data())
|
response = da.request_digest(pw, Data())
|
||||||
return ('Digest ' + templ.format(
|
return ('Digest ' + templ.format(
|
||||||
|
@ -452,7 +452,7 @@ class BasicNewsRecipe(Recipe):
|
|||||||
return self.feeds
|
return self.feeds
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def print_version(self, url):
|
def print_version(cls, url):
|
||||||
'''
|
'''
|
||||||
Take a `url` pointing to the webpage with article content and return the
|
Take a `url` pointing to the webpage with article content and return the
|
||||||
:term:`URL` pointing to the print version of the article. By default does
|
:term:`URL` pointing to the print version of the article. By default does
|
||||||
|
Loading…
x
Reference in New Issue
Block a user