Skip to content

Commit 6d110a1

Browse files
chore(internal): bump pyright version
1 parent 05810dd commit 6d110a1

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ voice_helpers = ["sounddevice>=0.5.1", "numpy>=2.0.2"]
5151
managed = true
5252
# version pins are in requirements-dev.lock
5353
dev-dependencies = [
54-
"pyright>=1.1.359",
54+
"pyright==1.1.399",
5555
"mypy",
5656
"respx",
5757
"pytest",

requirements-dev.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pygments==2.18.0
126126
# via rich
127127
pyjwt==2.8.0
128128
# via msal
129-
pyright==1.1.392.post0
129+
pyright==1.1.399
130130
pytest==8.3.3
131131
# via pytest-asyncio
132132
pytest-asyncio==0.24.0

src/openai/_base_client.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@
100100
_AsyncStreamT = TypeVar("_AsyncStreamT", bound=AsyncStream[Any])
101101

102102
if TYPE_CHECKING:
103-
from httpx._config import DEFAULT_TIMEOUT_CONFIG as HTTPX_DEFAULT_TIMEOUT
103+
from httpx._config import (
104+
DEFAULT_TIMEOUT_CONFIG, # pyright: ignore[reportPrivateImportUsage]
105+
)
106+
107+
HTTPX_DEFAULT_TIMEOUT = DEFAULT_TIMEOUT_CONFIG
104108
else:
105109
try:
106110
from httpx._config import DEFAULT_TIMEOUT_CONFIG as HTTPX_DEFAULT_TIMEOUT

src/openai/_models.py

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
)
2121

2222
import pydantic
23-
import pydantic.generics
2423
from pydantic.fields import FieldInfo
2524

2625
from ._types import (

src/openai/_utils/_typing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class MyResponse(Foo[_T]):
110110
```
111111
"""
112112
cls = cast(object, get_origin(typ) or typ)
113-
if cls in generic_bases:
113+
if cls in generic_bases: # pyright: ignore[reportUnnecessaryContains]
114114
# we're given the class directly
115115
return extract_type_arg(typ, index)
116116

tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from openai import OpenAI, AsyncOpenAI
1111

1212
if TYPE_CHECKING:
13-
from _pytest.fixtures import FixtureRequest
13+
from _pytest.fixtures import FixtureRequest # pyright: ignore[reportPrivateImportUsage]
1414

1515
pytest.register_assert_rewrite("tests.utils")
1616

tests/test_models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ class B(BaseModel):
832832

833833
@pytest.mark.skipif(not PYDANTIC_V2, reason="TypeAliasType is not supported in Pydantic v1")
834834
def test_type_alias_type() -> None:
835-
Alias = TypeAliasType("Alias", str)
835+
Alias = TypeAliasType("Alias", str) # pyright: ignore
836836

837837
class Model(BaseModel):
838838
alias: Alias

0 commit comments

Comments
 (0)