Skip to content

Commit

Permalink
Lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
zoriya committed Nov 29, 2023
1 parent f2ebc56 commit e0b2e8e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scanner/scanner/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ async def post(self, path: str, *, data: dict[str, Any]) -> str:
if r.status == 409 and (
(path == "shows" and ret["startAir"][:4] != str(data["start_air"].year))
or (
path == "movies" and ret["airDate"][:4] != str(data["air_date"].year)
path == "movies"
and ret["airDate"][:4] != str(data["air_date"].year)
)
):
logging.info(
Expand All @@ -224,14 +225,16 @@ async def post(self, path: str, *, data: dict[str, Any]) -> str:
async def delete(self, path: str):
logging.info("Deleting %s", path)
async with self._client.delete(
f"{self._url}/movies?filter=path eq \"{path}\"", headers={"X-API-Key": self._api_key}
f'{self._url}/movies?filter=path eq "{path}"',
headers={"X-API-Key": self._api_key},
) as r:
if not r.ok:
logging.error(f"Request error: {await r.text()}")
r.raise_for_status()

async with self._client.delete(
f"{self._url}/episodes?filter=path eq \"{path}\"", headers={"X-API-Key": self._api_key}
f'{self._url}/episodes?filter=path eq "{path}"',
headers={"X-API-Key": self._api_key},
) as r:
if not r.ok:
logging.error(f"Request error: {await r.text()}")
Expand Down

0 comments on commit e0b2e8e

Please sign in to comment.