diff --git a/pyproject.toml b/pyproject.toml index 3169a1adc..3543c4df3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,6 +81,8 @@ select = [ "F401", # bare except statements "E722", + # unused arguments + "ARG", # print statements "T201", "T203", diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 858f2e700..351324c99 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -405,7 +405,10 @@ def _build_headers(self, options: FinalRequestOptions) -> httpx.Headers: return headers - def _prepare_request(self, request: httpx.Request) -> None: + def _prepare_request( + self, + request: httpx.Request, # noqa: ARG002 + ) -> None: """This method is used as a callback for mutating the `Request` object after it has been constructed. @@ -509,7 +512,7 @@ def _process_response( self, *, cast_to: Type[ResponseT], - options: FinalRequestOptions, + options: FinalRequestOptions, # noqa: ARG002 response: httpx.Response, ) -> ResponseT: if cast_to is NoneType: @@ -616,7 +619,11 @@ def default_headers(self) -> dict[str, str | Omit]: **self._custom_headers, } - def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None: + def _validate_headers( + self, + headers: Headers, # noqa: ARG002 + custom_headers: Headers, # noqa: ARG002 + ) -> None: """Validate the given default headers and custom headers. Does nothing by default. diff --git a/src/increase/_compat.py b/src/increase/_compat.py index 5a7ce61b3..34323c9b7 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -20,25 +20,25 @@ # v1 re-exports if TYPE_CHECKING: - def parse_date(value: date | StrBytesIntFloat) -> date: + def parse_date(value: date | StrBytesIntFloat) -> date: # noqa: ARG001 ... - def parse_datetime(value: Union[datetime, StrBytesIntFloat]) -> datetime: + def parse_datetime(value: Union[datetime, StrBytesIntFloat]) -> datetime: # noqa: ARG001 ... - def get_args(t: type[Any]) -> tuple[Any, ...]: + def get_args(t: type[Any]) -> tuple[Any, ...]: # noqa: ARG001 ... - def is_union(tp: type[Any] | None) -> bool: + def is_union(tp: type[Any] | None) -> bool: # noqa: ARG001 ... - def get_origin(t: type[Any]) -> type[Any] | None: + def get_origin(t: type[Any]) -> type[Any] | None: # noqa: ARG001 ... - def is_literal_type(type_: type[Any]) -> bool: + def is_literal_type(type_: type[Any]) -> bool: # noqa: ARG001 ... - def is_typeddict(type_: type[Any]) -> bool: + def is_typeddict(type_: type[Any]) -> bool: # noqa: ARG001 ... else: diff --git a/src/increase/_exceptions.py b/src/increase/_exceptions.py index 2dc9414fb..23cde1015 100644 --- a/src/increase/_exceptions.py +++ b/src/increase/_exceptions.py @@ -53,7 +53,7 @@ class APIError(IncreaseError): If there was no response associated with this error then it will be `None`. """ - def __init__(self, message: str, request: httpx.Request, *, body: object | None) -> None: + def __init__(self, message: str, request: httpx.Request, *, body: object | None) -> None: # noqa: ARG002 super().__init__(message) self.request = request self.message = message diff --git a/tests/test_models.py b/tests/test_models.py index 888f8c5fc..3eeab526c 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -553,7 +553,7 @@ class Model(BaseModel): def test_type_compat() -> None: # our model type can be assigned to Pydantic's model type - def takes_pydantic(model: pydantic.BaseModel) -> None: + def takes_pydantic(model: pydantic.BaseModel) -> None: # noqa: ARG001 ... class OurModel(BaseModel):