From 6ab62a37323f8e8e8cd164de0e5031efd82cd682 Mon Sep 17 00:00:00 2001 From: Linusp Date: Wed, 13 Dec 2023 18:49:40 +0800 Subject: [PATCH] fix lint --- inoreader/client.py | 3 +-- inoreader/main.py | 21 +++++++++------------ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/inoreader/client.py b/inoreader/client.py index 7c00485..9a8eaff 100644 --- a/inoreader/client.py +++ b/inoreader/client.py @@ -24,7 +24,6 @@ class InoreaderClient(object): - # paths TOKEN_PATH = '/oauth2/token' USER_INFO_PATH = 'user-info' @@ -305,6 +304,6 @@ def edit_subscription(self, stream_id, action, title=None, add_folder=None, remo response = self.parse_response( r, # self.session.post(url, params=params, proxies=self.proxies), - json_data=False + json_data=False, ) return response diff --git a/inoreader/main.py b/inoreader/main.py index 17e7975..d885a15 100644 --- a/inoreader/main.py +++ b/inoreader/main.py @@ -452,9 +452,7 @@ def dedupe(folder, thresh): for docid, doc, _ in related: if docid == article.id: continue - sims[doc] = sim_of( - doc, article.title, method='cosine', term='char', ngram_range=(2, 3) - ) + sims[doc] = sim_of(doc, article.title, method='cosine', term='char', ngram_range=(2, 3)) if sims and max(sims.values()) >= thresh: top_doc, top_score = sims.most_common()[0] @@ -587,10 +585,13 @@ def fetch_starred(folder, tags, outfile, outdir, limit, save_image, out_format): @main.command("edit-subscription") -@click.option("-a", "--action", - required=True, - type=click.Choice(['follow', 'unfollow', 'rename', 'add-folder', 'remove-folder']), - help="") +@click.option( + "-a", + "--action", + required=True, + type=click.Choice(['follow', 'unfollow', 'rename', 'add-folder', 'remove-folder']), + help="", +) @click.option("-i", "--stream-id", required=True, help='Stream ID which you want to fetch') @click.option("-n", "--name", help='The name of subscription, for action follow/rename(required)') @click.option("-f", "--folder", help='Folder which subscription belong to') @@ -616,11 +617,7 @@ def edit_subscriptions(action, stream_id, name, folder): remove_folder = folder if action == 'remove-folder' else None try: response = client.edit_subscription( - stream_id, - edit_action, - title=name, - add_folder=add_folder, - remove_folder=remove_folder + stream_id, edit_action, title=name, add_folder=add_folder, remove_folder=remove_folder ) click.secho(response, fg="green") except Exception as exception: