Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
vrslev committed Aug 1, 2024
1 parent b9ee181 commit a3023c6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
15 changes: 10 additions & 5 deletions src/ikea_api/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,18 @@ class ResponseInfo(ABC):

@cached_property
@abstractmethod
def text(self) -> str: ...
def text(self) -> str:
...

@cached_property
@abstractmethod
def json(self) -> Any: ...
def json(self) -> Any:
...

@property
@abstractmethod
def is_success(self) -> bool: ...
def is_success(self) -> bool:
...


EndpointResponse = TypeVar("EndpointResponse")
Expand Down Expand Up @@ -95,7 +98,8 @@ def wrapper(
class SyncExecutor(ABC):
@staticmethod
@abstractmethod
def request(request: RequestInfo) -> ResponseInfo: ...
def request(request: RequestInfo) -> ResponseInfo:
...

@classmethod
def run(cls, endpoint: EndpointInfo[EndpointResponse]) -> EndpointResponse:
Expand All @@ -117,7 +121,8 @@ def run(cls, endpoint: EndpointInfo[EndpointResponse]) -> EndpointResponse:
class AsyncExecutor(ABC):
@staticmethod
@abstractmethod
async def request(request: RequestInfo) -> ResponseInfo: ...
async def request(request: RequestInfo) -> ResponseInfo:
...

@classmethod
async def run(cls, endpoint: EndpointInfo[EndpointResponse]) -> EndpointResponse:
Expand Down
4 changes: 1 addition & 3 deletions src/ikea_api/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

@dataclass(frozen=True)
class Constants:
user_agent: str = (
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15"
)
user_agent: str = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15"
base_url: str = "https://www.ikea.com"
country: str = "ru"
language: str = "ru"
Expand Down
1 change: 1 addition & 0 deletions tests/wrappers/parsers/test_item_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import pytest

from ikea_api.wrappers.parsers.item_base import (
ItemType,
get_is_combination_from_item_type,
Expand Down
4 changes: 2 additions & 2 deletions tests/wrappers/parsers/test_item_pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
from typing import Any

import pytest
from pydantic import HttpUrl, ValidationError

from ikea_api.wrappers.parsers.pip_item import (
Catalog,
CatalogRef,
CatalogRefs,
get_category_name_and_url,
parse_pip_item,
)
from pydantic import HttpUrl, ValidationError

from tests.conftest import TestData


Expand Down

0 comments on commit a3023c6

Please sign in to comment.