Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat: port layout selectors, filter, circular serialization (#1293)
Roll driver in preparation for 1.22 release. Ports the following changes: - [x] microsoft/playwright@54dd6d0 (feat(locator): layout options (leftOf, rightOf, above, below, near) (#13821)) - [x] microsoft/playwright@c3cf7ee (feat(layout locators): remove maxDistance option (#14013)) - [x] microsoft/playwright@6931d89 (feat(locators): rename locator.that to locator.filter (#14025))
- Loading branch information
Showing
19 changed files
with
1,193 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from typing import Dict, Generic, Tuple, TypeVar | ||
|
||
K = TypeVar("K") | ||
V = TypeVar("V") | ||
|
||
|
||
class Map(Generic[K, V]): | ||
def __init__(self) -> None: | ||
self._entries: Dict[int, Tuple[K, V]] = {} | ||
|
||
def __contains__(self, item: K) -> bool: | ||
return id(item) in self._entries | ||
|
||
def __setitem__(self, idx: K, value: V) -> None: | ||
self._entries[id(idx)] = (idx, value) | ||
|
||
def __getitem__(self, obj: K) -> V: | ||
return self._entries[id(obj)][1] |
Oops, something went wrong.