Skip to content

Commit 28c1677

Browse files
committed
align Browser type with the browsers actually supported at runtime
1 parent 7dbb058 commit 28c1677

2 files changed

Lines changed: 27 additions & 4 deletions

File tree

impit-python/python/impit/__init__.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,27 @@
9797
]
9898

9999

100-
Browser = Literal['chrome', 'firefox']
100+
Browser = Literal[
101+
'chrome',
102+
'chrome100',
103+
'chrome101',
104+
'chrome104',
105+
'chrome107',
106+
'chrome110',
107+
'chrome116',
108+
'chrome124',
109+
'chrome125',
110+
'chrome131',
111+
'chrome136',
112+
'chrome142',
113+
'firefox',
114+
'firefox128',
115+
'firefox133',
116+
'firefox135',
117+
'firefox144',
118+
'okhttp',
119+
'okhttp3',
120+
'okhttp4',
121+
'okhttp5',
122+
'ios18',
123+
]

impit-python/python/impit/impit.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ from http.cookiejar import CookieJar
33
from .cookies import Cookies
44
from .headers import Headers
55

6-
from typing import Literal, Any
6+
from . import Browser
7+
8+
from typing import Any
79
from collections.abc import Iterator, AsyncIterator
810
from contextlib import AbstractAsyncContextManager, AbstractContextManager
911

1012

11-
Browser = Literal['chrome', 'firefox', 'chrome125', 'chrome100', 'chrome101', 'chrome104', 'chrome107', 'chrome110', 'chrome116', 'chrome131', 'chrome136', 'chrome142', 'firefox128', 'firefox133', 'firefox135', 'firefox144', 'ios18']
12-
1313
USE_CLIENT_DEFAULT: str
1414
"""Sentinel that, when passed as a per-request ``timeout``, causes the client-level default timeout to be used.
1515

0 commit comments

Comments
 (0)