Skip to content

Commit

Permalink
Fix mypy lints.
Browse files Browse the repository at this point in the history
  • Loading branch information
emmiegit committed Jan 15, 2024
1 parent 379f730 commit 4c6a9e9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions yellowstone/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import json
import logging
from typing import NoReturn, Optional, TypedDict
from typing import NoReturn, TypedDict

import pugsql

Expand Down Expand Up @@ -64,7 +64,7 @@ def run(self) -> NoReturn:
def insert_all_sites(self) -> None:
for site_slug in self.config.site_slugs:
logger.info("Inserting site '%s' into database", site_slug)
get_site.run(site_slug)
get_site.run(self, site_slug=site_slug)

def queue_all_sites(self) -> None:
for site_slug in self.config.site_slugs:
Expand Down Expand Up @@ -104,7 +104,7 @@ def process_job(self, job: JobDict) -> None:
case JobType.INDEX_SITE_FORUMS:
raise NotImplementedError
case JobType.INDEX_SITE_MEMBERS:
assert isinstance(data, Optional[int]), "INDEX_SITE_MEMBERS"
assert data is None or isinstance(data, int), "INDEX_SITE_MEMBERS"
index_site_members.run(self, site_slug=value, offset=data)
case JobType.FETCH_USER:
assert isinstance(data, int), "GET_USER"
Expand Down
2 changes: 1 addition & 1 deletion yellowstone/jobs/get_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import logging
from typing import TYPE_CHECKING

from .. import JobType
from ..requests import user as user_data
from . import JobType

if TYPE_CHECKING:
from ..core import BackupDispatcher
Expand Down
2 changes: 1 addition & 1 deletion yellowstone/jobs/index_site_members.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import logging
from typing import Optional

from .. import JobType
from ..core import BackupDispatcher
from ..requests import site_members
from . import JobType

START_OFFSET = 1

Expand Down
2 changes: 1 addition & 1 deletion yellowstone/requests/site_home_raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from dataclasses import dataclass
from typing import TYPE_CHECKING, Optional

from bs import BeautifulSoup
from bs4 import BeautifulSoup

from ..scraper import download_html, find_element, make_soup, regex_extract
from ..wikidot import Wikidot
Expand Down

0 comments on commit 4c6a9e9

Please sign in to comment.