From 72db970265f18a15080d7362f24cd99b8f3daea8 Mon Sep 17 00:00:00 2001 From: redxef Date: Wed, 5 Mar 2025 14:43:36 +0100 Subject: [PATCH] fix: some linter warnings. --- adapters/wordpress.py | 3 ++- main.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/adapters/wordpress.py b/adapters/wordpress.py index 9920f6b..cc5a604 100644 --- a/adapters/wordpress.py +++ b/adapters/wordpress.py @@ -160,7 +160,7 @@ class Wordpress(Sink, Adapter): nonce = soup.find_all('input', {'id': 'wpbs_token'})[0] return nonce['value'] - def post_events(self, events, start: datetime.datetime | None=None, until: datetime.timedelta | None=None): + def post_events(self, events, start: datetime.datetime | None=None, until: datetime.timedelta | None=None) -> bool: metadata = self.calendar_metadata.to_dict() data = self._generate_data(events, start=start, until=until) update_request = self.session.post( @@ -176,5 +176,6 @@ class Wordpress(Sink, Adapter): r = 'wpbs_message=calendar_update_success' in update_request.text if not r: raise Exception(f'failed to post events, got answer {update_request.text}') + return True diff --git a/main.py b/main.py index d00086c..2d0df37 100755 --- a/main.py +++ b/main.py @@ -11,7 +11,6 @@ from schema import Schema, And, Or, Use, Optional, Regex import click import adapters -from adapters import * logging.VERBOSE = (logging.DEBUG + logging.INFO) // 2