Skip to content

Commit a22652e

Browse files
committed
Lint
1 parent 3da61f6 commit a22652e

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

calibre-plugin/bookshare.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import mimetypes
1+
#import mimetypes
22
from contextlib import closing
33

44
try:
5-
from urllib.parse import urljoin, quote_plus
5+
from urllib.parse import quote_plus, urljoin
66
except ImportError:
7-
from urllib2 import urljoin, quote_plus
7+
from urllib2 import quote_plus, urljoin
88

9-
from bs4 import BeautifulSoup
10-
from http.cookiejar import LoadError, LWPCookieJar, MozillaCookieJar
9+
from http.cookiejar import LoadError, LWPCookieJar #, MozillaCookieJar
1110

11+
from bs4 import BeautifulSoup
1212
from PyQt5.Qt import QUrl
1313

1414
#from calibre.utils.opensearch.query import Query
@@ -18,7 +18,7 @@
1818
from calibre.gui2.store.search_result import SearchResult
1919
from calibre.gui2.store.web_store_dialog import WebStoreDialog
2020

21-
from .config import BookshareConfigWidget, BookshareStorePluginConfig, COOKIEJAR_PATH, CONFIG
21+
from .config import CONFIG, COOKIEJAR_PATH, BookshareStorePluginConfig
2222

2323
BASE_URL = "https://www.bookshare.org"
2424
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"

calibre-plugin/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import os
22

3-
from . import PLUGIN_NAME
4-
from .config_widget_ui import Ui_Form
3+
from qt.core import QWidget
54

6-
from calibre.utils.config import JSONConfig
75
from calibre.constants import config_dir as abs_config_dir
86
from calibre.gui2.store.basic_config import BasicStoreConfig
7+
from calibre.utils.config import JSONConfig
98

10-
from qt.core import QWidget
9+
from . import PLUGIN_NAME
10+
from .config_widget_ui import Ui_Form
1111

1212
CONFIG_DIR = os.path.join("plugins", "robchio")
1313
JSON_PATH = os.path.join(CONFIG_DIR, PLUGIN_NAME + ".json")

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ line-length = 160
1919
indent-width = 4
2020
target-version = "py38"
2121
builtins = ["_"]
22+
extend-exclude = ["calibre-plugin/*_ui.py"]
2223

2324
[tool.ruff.lint]
2425
ignore = ["E402", "E722", "E401", "N999", "RUF012"]

0 commit comments

Comments
 (0)