gochan-org / gochan

Consider using f-strings PYL-C0209
Performance
Minor
2 months ago2 years old
Formatting a regular string which could be a f-string
52	qr_buttons = options.driver.find_element(by=By.ID, value="qr-buttons")
53	if qr_buttons.is_displayed():
54		qr_buttons.find_element(by=By.LINK_TEXT, value="X").click()
55	options.driver.find_element(by=By.CSS_SELECTOR, value=("input#check%s"%postID)).click()56	if password != "":
57		delPasswordInput = options.driver.find_element(
58			by=By.CSS_SELECTOR,
Formatting a regular string which could be a f-string
 72			value="input[name=move_btn]").click()
 73		# wait for response to move_btn
 74		WebDriverWait(self.driver, 10).until(
 75			EC.title_contains("Move thread #%s" % threadID)) 76
 77		self.driver.find_element(
 78			by=By.CSS_SELECTOR,
Formatting a regular string which could be a f-string
 65		threadID = threadRE.findall(cur_url)[0][1]
 66		self.driver.find_element(
 67			by=By.CSS_SELECTOR,
 68			value=("input#check%s"%threadID)).click() 69		cur_url = self.driver.current_url
 70		self.driver.find_element(
 71			by=By.CSS_SELECTOR,
Formatting a regular string which could be a f-string
69
70	argParser.add_argument("--browser", choices=testable_browsers, required=True)
71	argParser.add_argument("--site", default=testingSite,
72		help=("Sets the site to be used for testing, defaults to %s" % testingSite))73	argParser.add_argument("--board", default=testingBoard,
74		help="Sets the board to be used for testing")
75	argParser.add_argument("--headless", action="store_true",
Formatting a regular string which could be a f-string
29	if upload != "":
30		options.upload_path = upload
31
32	print("Using browser %s (headless: %s) on site %s" % (browser, options.headless, options.site))33	if single_test == "":
34		suite = unittest.suite.TestSuite()
35		SeleniumTestCase.add(suite, options, TestPosting)