fix: some linter warnings.
This commit is contained in:
parent
7b671e950a
commit
72db970265
2 changed files with 2 additions and 2 deletions
|
@ -160,7 +160,7 @@ class Wordpress(Sink, Adapter):
|
||||||
nonce = soup.find_all('input', {'id': 'wpbs_token'})[0]
|
nonce = soup.find_all('input', {'id': 'wpbs_token'})[0]
|
||||||
return nonce['value']
|
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()
|
metadata = self.calendar_metadata.to_dict()
|
||||||
data = self._generate_data(events, start=start, until=until)
|
data = self._generate_data(events, start=start, until=until)
|
||||||
update_request = self.session.post(
|
update_request = self.session.post(
|
||||||
|
@ -176,5 +176,6 @@ class Wordpress(Sink, Adapter):
|
||||||
r = 'wpbs_message=calendar_update_success' in update_request.text
|
r = 'wpbs_message=calendar_update_success' in update_request.text
|
||||||
if not r:
|
if not r:
|
||||||
raise Exception(f'failed to post events, got answer {update_request.text}')
|
raise Exception(f'failed to post events, got answer {update_request.text}')
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
1
main.py
1
main.py
|
@ -11,7 +11,6 @@ from schema import Schema, And, Or, Use, Optional, Regex
|
||||||
import click
|
import click
|
||||||
|
|
||||||
import adapters
|
import adapters
|
||||||
from adapters import *
|
|
||||||
|
|
||||||
logging.VERBOSE = (logging.DEBUG + logging.INFO) // 2
|
logging.VERBOSE = (logging.DEBUG + logging.INFO) // 2
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue