Skip to content

Commit a947b4d

Browse files
stainless-botRobertCraigie
authored andcommitted
chore(internal): enable lint rule
1 parent 5ef20d7 commit a947b4d

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ select = [
8888
"F401",
8989
# bare except statements
9090
"E722",
91+
# unused arguments
92+
"ARG",
9193
# print statements
9294
"T201",
9395
"T203",

src/openai/_base_client.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,10 @@ def _build_headers(self, options: FinalRequestOptions) -> httpx.Headers:
405405

406406
return headers
407407

408-
def _prepare_request(self, request: httpx.Request) -> None:
408+
def _prepare_request(
409+
self,
410+
request: httpx.Request, # noqa: ARG002
411+
) -> None:
409412
"""This method is used as a callback for mutating the `Request` object
410413
after it has been constructed.
411414
@@ -509,7 +512,7 @@ def _process_response(
509512
self,
510513
*,
511514
cast_to: Type[ResponseT],
512-
options: FinalRequestOptions,
515+
options: FinalRequestOptions, # noqa: ARG002
513516
response: httpx.Response,
514517
) -> ResponseT:
515518
if cast_to is NoneType:
@@ -616,7 +619,11 @@ def default_headers(self) -> dict[str, str | Omit]:
616619
**self._custom_headers,
617620
}
618621

619-
def _validate_headers(self, headers: Headers, custom_headers: Headers) -> None:
622+
def _validate_headers(
623+
self,
624+
headers: Headers, # noqa: ARG002
625+
custom_headers: Headers, # noqa: ARG002
626+
) -> None:
620627
"""Validate the given default headers and custom headers.
621628
622629
Does nothing by default.

src/openai/_compat.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@
2020
# v1 re-exports
2121
if TYPE_CHECKING:
2222

23-
def parse_date(value: date | StrBytesIntFloat) -> date:
23+
def parse_date(value: date | StrBytesIntFloat) -> date: # noqa: ARG001
2424
...
2525

26-
def parse_datetime(value: Union[datetime, StrBytesIntFloat]) -> datetime:
26+
def parse_datetime(value: Union[datetime, StrBytesIntFloat]) -> datetime: # noqa: ARG001
2727
...
2828

29-
def get_args(t: type[Any]) -> tuple[Any, ...]:
29+
def get_args(t: type[Any]) -> tuple[Any, ...]: # noqa: ARG001
3030
...
3131

32-
def is_union(tp: type[Any] | None) -> bool:
32+
def is_union(tp: type[Any] | None) -> bool: # noqa: ARG001
3333
...
3434

35-
def get_origin(t: type[Any]) -> type[Any] | None:
35+
def get_origin(t: type[Any]) -> type[Any] | None: # noqa: ARG001
3636
...
3737

38-
def is_literal_type(type_: type[Any]) -> bool:
38+
def is_literal_type(type_: type[Any]) -> bool: # noqa: ARG001
3939
...
4040

41-
def is_typeddict(type_: type[Any]) -> bool:
41+
def is_typeddict(type_: type[Any]) -> bool: # noqa: ARG001
4242
...
4343

4444
else:

tests/test_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ class Model(BaseModel):
553553
def test_type_compat() -> None:
554554
# our model type can be assigned to Pydantic's model type
555555

556-
def takes_pydantic(model: pydantic.BaseModel) -> None:
556+
def takes_pydantic(model: pydantic.BaseModel) -> None: # noqa: ARG001
557557
...
558558

559559
class OurModel(BaseModel):

0 commit comments

Comments
 (0)