Skip to content

Commit 10a0600

Browse files
committed
[py]: make types correct for RelativeBy initialiser
1 parent ccf55fe commit 10a0600

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

py/selenium/webdriver/support/relative_locator.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
18-
1917
from typing import Dict
2018
from typing import List
19+
from typing import Optional
2120
from typing import Union
2221

2322
from selenium.common.exceptions import WebDriverException
@@ -71,7 +70,7 @@ class RelativeBy:
7170
assert "mid" in ids
7271
"""
7372

74-
def __init__(self, root: Dict[By, str] = None, filters: List = None):
73+
def __init__(self, root: Optional[Dict[Union[By, str], str]] = None, filters: Optional[List] = None):
7574
"""
7675
Creates a new RelativeBy object. It is preferred if you use the
7776
`locate_with` method as this signature could change.

0 commit comments

Comments
 (0)