Skip to content

Commit 093c106

Browse files
committed
Optimize code with syntax refactoring
1 parent 1b9c750 commit 093c106

20 files changed

+4375
-2724
lines changed

seleniumbase/config/ad_block_list.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
'[src*="33across.com"]',
4848
'[src*="adsrvr"]',
4949
'[type="data-doubleclick"]',
50-
'iframe[data-google-container-id]',
50+
"iframe[data-google-container-id]",
5151
'iframe[src*="doubleclick"]',
5252
'iframe[src*="/AdServer/"]',
5353
'iframe[src*="openx.net"]',
@@ -64,14 +64,14 @@
6464
'[data-type="ad"]',
6565
'[data-track-event-label*="-taboola-"]',
6666
'[data-ad-feedback-beacon*="AD_"]',
67-
'[data-ad-feedback-beacon]',
67+
"[data-ad-feedback-beacon]",
6868
'[data-dcm-click-tracker*="/adclick."]',
69-
'[data-google-av-adk]',
70-
'[data-google-query-id]',
69+
"[data-google-av-adk]",
70+
"[data-google-query-id]",
7171
'[data-ylk*="sponsored_cluster"]',
7272
'[data-google-av-cxn*="pagead"]',
73-
'[data-ad-client]',
74-
'[data-ad-slot]',
73+
"[data-ad-client]",
74+
"[data-ad-slot]",
7575
'[href*="doubleclick"]',
7676
'[href*="amazon-adsystem"]',
7777
'[alt="Advertisement"]',
@@ -88,23 +88,23 @@
8888
'[id="tryitLeaderboard"]',
8989
'[id="dianomiRightRail"]',
9090
'[allow*="advertising.com"]',
91-
'ins.adsby',
92-
'li.strm-ad-clusters',
93-
'li.js-stream-ad',
94-
'div.after_ad',
95-
'div.ad-container',
96-
'div.ad_module',
97-
'div.ad-subnav-container',
98-
'div.ad-wrapper',
99-
'div.adroll-block',
100-
'div.data-ad-container',
101-
'div.GoogleActiveViewElement',
102-
'div.l-ad',
103-
'div.right-ad',
104-
'div.wx-adWrapper',
91+
"ins.adsby",
92+
"li.strm-ad-clusters",
93+
"li.js-stream-ad",
94+
"div.after_ad",
95+
"div.ad-container",
96+
"div.ad_module",
97+
"div.ad-subnav-container",
98+
"div.ad-wrapper",
99+
"div.adroll-block",
100+
"div.data-ad-container",
101+
"div.GoogleActiveViewElement",
102+
"div.l-ad",
103+
"div.right-ad",
104+
"div.wx-adWrapper",
105105
'div.image > a > img[src*="HomepageAd"]',
106106
'img[src*="HomepageAd"]',
107-
'img.img_ad',
107+
"img.img_ad",
108108
'link[href*="/adservice."]',
109-
'section.dianomi-ad',
109+
"section.dianomi-ad",
110110
]

seleniumbase/config/settings.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@
3838
HTML_REPORT = "report.html"
3939
RESULTS_TABLE = "results_table.csv"
4040

41-
'''
41+
"""
4242
This adds wait_for_ready_state_complete() after various browser actions.
4343
Setting this to True may improve reliability at the cost of speed.
44-
'''
44+
"""
4545
# Called after self.open(url) or self.open_url(url), NOT self.driver.open(url)
4646
WAIT_FOR_RSC_ON_PAGE_LOADS = True
4747
# Called after self.click(selector), NOT element.click()
4848
WAIT_FOR_RSC_ON_CLICKS = True
4949

50-
'''
50+
"""
5151
This adds wait_for_angularjs() after various browser actions.
5252
(Requires WAIT_FOR_RSC_ON_PAGE_LOADS and WAIT_FOR_RSC_ON_CLICKS to also be on.)
53-
'''
53+
"""
5454
WAIT_FOR_ANGULARJS = True
5555

5656
# Default time to wait after each browser action performed during Demo Mode.

seleniumbase/console_scripts/sb_mkdir.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ def main():
295295
data.append("")
296296
data.append("")
297297
data.append("class MyTestClass(BaseCase):")
298-
data.append("")
299298
data.append(" def test_basics(self):")
300299
data.append(' url = "https://store.xkcd.com/collections/posters"')
301300
data.append(" self.open(url)")

0 commit comments

Comments
 (0)