Skip to content

Commit 0bfdfe4

Browse files
committed
Run Black
1 parent 5efac80 commit 0bfdfe4

File tree

18 files changed

+420
-161
lines changed

18 files changed

+420
-161
lines changed

atest/run.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@
102102
]
103103

104104

105-
def acceptance_tests(interpreter, browser, rf_options=None, grid=None, event_firing=None):
105+
def acceptance_tests(
106+
interpreter, browser, rf_options=None, grid=None, event_firing=None
107+
):
106108
if os.path.exists(RESULTS_DIR):
107109
shutil.rmtree(RESULTS_DIR)
108110
os.mkdir(RESULTS_DIR)
@@ -320,7 +322,9 @@ def create_zip():
320322
if rc != 0:
321323
print("Not running acceptance test, because unit tests failed.")
322324
sys.exit(rc)
323-
failures = acceptance_tests(interpreter, browser, rf_options, selenium_grid, event_firing_webdriver)
325+
failures = acceptance_tests(
326+
interpreter, browser, rf_options, selenium_grid, event_firing_webdriver
327+
)
324328
if args.zip:
325329
create_zip()
326330
sys.exit(failures)

docs/extending/event_firing_webdriver/MyListener.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44

55
class MyListener(AbstractEventListener):
6-
76
def before_navigate_to(self, url, driver):
87
logger.info("Before navigate to %s" % url)
98

docs/extending/examples/decomposition/Decomposition.py

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,41 @@
44

55

66
class BrowserKeywords(LibraryComponent):
7-
87
def __init__(self, ctx):
98
LibraryComponent.__init__(self, ctx)
109

1110
@keyword
1211
def open_browser(self, host):
13-
url = f'http://{host}.com/'
12+
url = f"http://{host}.com/"
1413
browser_management = BrowserManagementKeywords(self.ctx)
15-
browser_management.open_browser(url, 'chrome')
14+
browser_management.open_browser(url, "chrome")
1615

1716

1817
class DesiredCapabilitiesKeywords(LibraryComponent):
19-
2018
def __init__(self, ctx):
2119
LibraryComponent.__init__(self, ctx)
2220

2321
@keyword
2422
def get_browser_desired_capabilities(self):
25-
self.info('Getting currently open browser desired capabilities')
23+
self.info("Getting currently open browser desired capabilities")
2624
return self.driver.desired_capabilities
2725

2826

2927
class Decomposition(SeleniumLibrary):
30-
31-
def __init__(self, timeout=5.0, implicit_wait=0.0,
32-
run_on_failure='Capture Page Screenshot',
33-
screenshot_root_directory=None):
34-
SeleniumLibrary.__init__(self, timeout=timeout, implicit_wait=implicit_wait,
35-
run_on_failure=run_on_failure,
36-
screenshot_root_directory=screenshot_root_directory)
37-
self.add_library_components([BrowserKeywords(self),
38-
DesiredCapabilitiesKeywords(self)])
28+
def __init__(
29+
self,
30+
timeout=5.0,
31+
implicit_wait=0.0,
32+
run_on_failure="Capture Page Screenshot",
33+
screenshot_root_directory=None,
34+
):
35+
SeleniumLibrary.__init__(
36+
self,
37+
timeout=timeout,
38+
implicit_wait=implicit_wait,
39+
run_on_failure=run_on_failure,
40+
screenshot_root_directory=screenshot_root_directory,
41+
)
42+
self.add_library_components(
43+
[BrowserKeywords(self), DesiredCapabilitiesKeywords(self)]
44+
)

docs/extending/examples/get_instance/GetSeleniumLibraryInstance.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44

55
def open_browser(host):
6-
url = f'http://{host}.com/'
7-
sl = BuiltIn().get_library_instance('SeleniumLibrary')
8-
sl.open_browser(url, 'chrome')
6+
url = f"http://{host}.com/"
7+
sl = BuiltIn().get_library_instance("SeleniumLibrary")
8+
sl.open_browser(url, "chrome")
99

1010

1111
def get_browser_desired_capabilities():
12-
logger.info('Getting currently open browser desired capabilities')
13-
sl = BuiltIn().get_library_instance('SeleniumLibrary')
12+
logger.info("Getting currently open browser desired capabilities")
13+
sl = BuiltIn().get_library_instance("SeleniumLibrary")
1414
return sl.driver.desired_capabilities

docs/extending/examples/inheritance/InheritSeleniumLibrary.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,25 @@
55

66

77
class InheritSeleniumLibrary(SeleniumLibrary):
8-
98
@keyword
109
def open_browser(self, host):
11-
url = f'http://{host}.com/'
10+
url = f"http://{host}.com/"
1211
browser_management = BrowserManagementKeywords(self)
13-
browser_management.open_browser(url, 'chrome')
12+
browser_management.open_browser(url, "chrome")
1413

1514
@keyword
1615
def get_browser_desired_capabilities(self):
17-
logger.info('Getting currently open browser desired capabilities')
16+
logger.info("Getting currently open browser desired capabilities")
1817
return self.driver.desired_capabilities
1918

2019
def not_keywords_but_public_methods(self):
21-
logger.info('Python public method not a keyword, because it is not '
22-
'decorated with @keyword decorator')
20+
logger.info(
21+
"Python public method not a keyword, because it is not "
22+
"decorated with @keyword decorator"
23+
)
2324

2425
def _private_method_are_not_keywords(self):
25-
logger.info('Python private method is not a keyword, because it is not '
26-
'decorated with @keyword decorator')
26+
logger.info(
27+
"Python private method is not a keyword, because it is not "
28+
"decorated with @keyword decorator"
29+
)

docs/extending/extending/decomposition/Decomposition.py

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,41 @@
44

55

66
class BrowserKeywords(LibraryComponent):
7-
87
def __init__(self, ctx):
98
LibraryComponent.__init__(self, ctx)
109

1110
@keyword
1211
def open_browser(self, host):
13-
url = f'http://{host}.com/'
12+
url = f"http://{host}.com/"
1413
browser_management = BrowserManagementKeywords(self.ctx)
15-
browser_management.open_browser(url, 'chrome')
14+
browser_management.open_browser(url, "chrome")
1615

1716

1817
class DesiredCapabilitiesKeywords(LibraryComponent):
19-
2018
def __init__(self, ctx):
2119
LibraryComponent.__init__(self, ctx)
2220

2321
@keyword
2422
def get_browser_desired_capabilities(self):
25-
self.info('Getting currently open browser desired capabilities')
23+
self.info("Getting currently open browser desired capabilities")
2624
return self.driver.desired_capabilities
2725

2826

2927
class Decomposition(SeleniumLibrary):
30-
31-
def __init__(self, timeout=5.0, implicit_wait=0.0,
32-
run_on_failure='Capture Page Screenshot',
33-
screenshot_root_directory=None):
34-
SeleniumLibrary.__init__(self, timeout=timeout, implicit_wait=implicit_wait,
35-
run_on_failure=run_on_failure,
36-
screenshot_root_directory=screenshot_root_directory)
37-
self.add_library_components([BrowserKeywords(self),
38-
DesiredCapabilitiesKeywords(self)])
28+
def __init__(
29+
self,
30+
timeout=5.0,
31+
implicit_wait=0.0,
32+
run_on_failure="Capture Page Screenshot",
33+
screenshot_root_directory=None,
34+
):
35+
SeleniumLibrary.__init__(
36+
self,
37+
timeout=timeout,
38+
implicit_wait=implicit_wait,
39+
run_on_failure=run_on_failure,
40+
screenshot_root_directory=screenshot_root_directory,
41+
)
42+
self.add_library_components(
43+
[BrowserKeywords(self), DesiredCapabilitiesKeywords(self)]
44+
)

docs/extending/extending/get_instance/GetSeleniumLibraryInstance.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44

55
def open_browser(host):
6-
url = f'http://{host}.com/'
7-
sl = BuiltIn().get_library_instance('SeleniumLibrary')
8-
sl.open_browser(url, 'chrome')
6+
url = f"http://{host}.com/"
7+
sl = BuiltIn().get_library_instance("SeleniumLibrary")
8+
sl.open_browser(url, "chrome")
99

1010

1111
def get_browser_desired_capabilities():
12-
logger.info('Getting currently open browser desired capabilities')
13-
sl = BuiltIn().get_library_instance('SeleniumLibrary')
12+
logger.info("Getting currently open browser desired capabilities")
13+
sl = BuiltIn().get_library_instance("SeleniumLibrary")
1414
return sl.driver.desired_capabilities

docs/extending/extending/inheritance/InheritSeleniumLibrary.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,25 @@
55

66

77
class InheritSeleniumLibrary(SeleniumLibrary):
8-
98
@keyword
109
def open_browser(self, host):
11-
url = f'http://{host}.com/'
10+
url = f"http://{host}.com/"
1211
browser_management = BrowserManagementKeywords(self)
13-
browser_management.open_browser(url, 'chrome')
12+
browser_management.open_browser(url, "chrome")
1413

1514
@keyword
1615
def get_browser_desired_capabilities(self):
17-
logger.info('Getting currently open browser desired capabilities')
16+
logger.info("Getting currently open browser desired capabilities")
1817
return self.driver.desired_capabilities
1918

2019
def not_keywords_but_public_methods(self):
21-
logger.info('Python public method not a keyword, because it is not '
22-
'decorated with @keyword decorator')
20+
logger.info(
21+
"Python public method not a keyword, because it is not "
22+
"decorated with @keyword decorator"
23+
)
2324

2425
def _private_method_are_not_keywords(self):
25-
logger.info('Python private method is not a keyword, because it is not '
26-
'decorated with @keyword decorator')
26+
logger.info(
27+
"Python private method is not a keyword, because it is not "
28+
"decorated with @keyword decorator"
29+
)

docs/extending/plugin_api/MyPlugin.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,16 @@
55

66

77
class DummyFinder:
8-
98
def __init__(self, ctx):
109
self.ctx = ctx
1110

1211
def find(self, *args):
1312
logger.info('DummyFinder args "%s"' % str(args))
14-
logger.info('Original finder %s'
15-
% self.ctx._original_element_finder )
16-
return 'Dummy find'
13+
logger.info("Original finder %s" % self.ctx._original_element_finder)
14+
return "Dummy find"
1715

1816

1917
class MyPlugin(LibraryComponent):
20-
2118
def __init__(self, ctx):
2219
LibraryComponent.__init__(self, ctx)
2320
ctx._original_element_finder = ElementFinder(ctx)
@@ -26,8 +23,8 @@ def __init__(self, ctx):
2623
@keyword
2724
def new_keyword(self):
2825
"""Adding new keyword."""
29-
self.info('New Keyword')
30-
return 'New Keyword'
26+
self.info("New Keyword")
27+
return "New Keyword"
3128

3229
@keyword()
3330
def open_browser(self, location):

0 commit comments

Comments
 (0)