A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/seleniumhq/selenium/commit/e142d5d028c2fd8cdb56c81b7efe26b06000af77 below:

additional type hints for `interaction.py` · SeleniumHQ/selenium@e142d5d · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+5

-6

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+5

-6

lines changed Original file line number Diff line number Diff line change

@@ -14,7 +14,7 @@

14 14

# KIND, either express or implied. See the License for the

15 15

# specific language governing permissions and limitations

16 16

# under the License.

17 - 17 +

import typing

18 18 19 19

KEY = "key"

20 20

POINTER = "pointer"

@@ -33,18 +33,17 @@ class Interaction:

33 33 34 34

PAUSE = "pause"

35 35 36 -

def __init__(self, source):

36 +

def __init__(self, source) -> None:

37 37

self.source = source

38 38 39 39 40 40

class Pause(Interaction):

41 41 42 -

def __init__(self, source, duration=0):

43 -

super(Interaction, self).__init__()

44 -

self.source = source

42 +

def __init__(self, source, duration: float = 0) -> None:

43 +

super().__init__(source)

45 44

self.duration = duration

46 45 47 -

def encode(self):

46 +

def encode(self) -> typing.Dict[str, typing.Union[str, int]]:

48 47

return {

49 48

"type": self.PAUSE,

50 49

"duration": int(self.duration * 1000)

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4