Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
enku committed Oct 9, 2024
1 parent d55c9b3 commit 1dff7f5
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 20 deletions.
3 changes: 1 addition & 2 deletions src/gentoo_build_publisher/fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
import os
import shutil
import tarfile
from collections.abc import Callable, Iterable
from pathlib import Path
from typing import IO, TypeVar
from typing import IO, Callable, Iterable, TypeVar

_T = TypeVar("_T", bytes, str)

Expand Down
3 changes: 1 addition & 2 deletions src/gentoo_build_publisher/graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@

import datetime as dt
import importlib.metadata
from collections.abc import Callable
from dataclasses import dataclass, replace
from functools import wraps
from importlib import resources
from typing import Any, TypeAlias, TypedDict
from typing import Any, Callable, TypeAlias, TypedDict

from ariadne import (
EnumType,
Expand Down
3 changes: 1 addition & 2 deletions src/gentoo_build_publisher/jenkins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

import json as jsonlib
import logging
from collections.abc import Iterable
from dataclasses import dataclass
from functools import partial
from pathlib import PurePosixPath
from typing import Any, Self
from typing import Any, Iterable, Self

import requests
from yarl import URL
Expand Down
3 changes: 1 addition & 2 deletions src/gentoo_build_publisher/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@

import logging
import math
from collections.abc import Iterable
from datetime import datetime
from difflib import Differ
from functools import cached_property
from typing import Any
from typing import Any, Iterable

from gentoo_build_publisher.jenkins import Jenkins, JenkinsMetadata
from gentoo_build_publisher.purge import Purger
Expand Down
3 changes: 1 addition & 2 deletions src/gentoo_build_publisher/purge.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
from __future__ import annotations

import datetime
from collections.abc import Callable, Iterable
from typing import Generic, TypeVar
from typing import Callable, Generic, Iterable, TypeVar

T = TypeVar("T") # pylint: disable=invalid-name

Expand Down
3 changes: 1 addition & 2 deletions src/gentoo_build_publisher/records/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

import datetime as dt
import importlib.metadata
from collections.abc import Iterable
from dataclasses import dataclass
from typing import Any, Protocol, Self
from typing import Any, Iterable, Protocol, Self

from gentoo_build_publisher.settings import Settings
from gentoo_build_publisher.types import ApiKey, Build
Expand Down
3 changes: 1 addition & 2 deletions src/gentoo_build_publisher/records/django_orm.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""Django ORM records implementation"""

import datetime as dt
from collections.abc import Iterable
from dataclasses import replace
from typing import Any
from typing import Any, Iterable

from django.conf import settings
from django.db import models
Expand Down
3 changes: 1 addition & 2 deletions src/gentoo_build_publisher/records/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import datetime as dt
import typing as t
from collections.abc import Iterable
from dataclasses import replace

from gentoo_build_publisher.records import BuildRecord, RecordNotFound
Expand Down Expand Up @@ -149,7 +148,7 @@ def latest(self, machine: str, completed: bool = False) -> BuildRecord | None:

return records[-1]

def search(self, machine: str, field: str, key: str) -> Iterable[BuildRecord]:
def search(self, machine: str, field: str, key: str) -> t.Iterable[BuildRecord]:
"""search the given field for given machine
field must be a BuildRecord field. Not all fields may be searchable, in which
Expand Down
3 changes: 1 addition & 2 deletions src/gentoo_build_publisher/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
import logging
import shutil
import tempfile
from collections.abc import Iterable
from functools import lru_cache
from pathlib import Path
from typing import IO
from typing import IO, Iterable

import orjson

Expand Down
3 changes: 1 addition & 2 deletions src/gentoo_build_publisher/string.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Misc string operations"""

from collections.abc import Iterator
from typing import IO
from typing import IO, Iterator

FALSE_VALUES = {"0", "f", "false", "n", "no", "off"}
TRUE_VALUES = {"1", "on", "t", "true", "y", "yes"}
Expand Down

0 comments on commit 1dff7f5

Please sign in to comment.