File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
py/selenium/webdriver/remote Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 17
17
18
18
from abc import ABCMeta , abstractmethod
19
19
import os
20
+ from typing import Optional
20
21
from selenium .webdriver .common .utils import keys_to_typing
22
+ from selenium .types import AnyKey
21
23
22
24
23
25
class FileDetector (metaclass = ABCMeta ):
@@ -27,16 +29,16 @@ class FileDetector(metaclass=ABCMeta):
27
29
"""
28
30
29
31
@abstractmethod
30
- def is_local_file (self , * keys ) :
31
- return
32
+ def is_local_file (self , * keys : AnyKey ) -> Optional [ str ] :
33
+ return None
32
34
33
35
34
36
class UselessFileDetector (FileDetector ):
35
37
"""
36
38
A file detector that never finds anything.
37
39
"""
38
40
39
- def is_local_file (self , * keys ) :
41
+ def is_local_file (self , * keys : AnyKey ) -> Optional [ str ] :
40
42
return None
41
43
42
44
@@ -45,7 +47,7 @@ class LocalFileDetector(FileDetector):
45
47
Detects files on the local disk.
46
48
"""
47
49
48
- def is_local_file (self , * keys ) :
50
+ def is_local_file (self , * keys : AnyKey ) -> Optional [ str ] :
49
51
file_path = '' .join (keys_to_typing (keys ))
50
52
51
53
if not file_path :
You can’t perform that action at this time.
0 commit comments