Skip to content

Commit c3a594b

Browse files
committed
fix: correct typing of RemoteObject
1 parent 9883ab0 commit c3a594b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pyppeteer/jshandle.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
import logging
44
import math
55
import os
6-
from idlelib.rpc import RemoteObject
76
from pathlib import Path
87
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
98

109
from pyppeteer import helpers
1110
from pyppeteer.connection import CDPSession
1211
from pyppeteer.errors import BrowserError, ElementHandleError
13-
from pyppeteer.models import JSFunctionArg, MouseButton
12+
from pyppeteer.models import JSFunctionArg, MouseButton, Protocol
1413

1514
if TYPE_CHECKING:
1615
from pyppeteer.page import Page
@@ -36,7 +35,7 @@ class JSHandle:
3635
with the :meth:`~pyppeteer.page.Page.evaluateHandle` method.
3736
"""
3837

39-
def __init__(self, context: 'ExecutionContext', client: 'CDPSession', remoteObject: 'RemoteObject'):
38+
def __init__(self, context: 'ExecutionContext', client: 'CDPSession', remoteObject: Protocol.Runtime.RemoteObject):
4039
self._context = context
4140
self._client = client
4241
self._remoteObject = remoteObject
@@ -120,7 +119,7 @@ def __init__(
120119
self,
121120
context: 'ExecutionContext',
122121
client: CDPSession,
123-
remoteObject: RemoteObject,
122+
remoteObject: Protocol.Runtime.RemoteObject,
124123
page: 'Page',
125124
frameManager: 'FrameManager',
126125
):

0 commit comments

Comments
 (0)