mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-04 08:50:41 +08:00
Make some ruff fixes (#8154)
* Make some ruff fixes * Undo manual fix * Undo manual fix * Updates from ruff=0.0.251
This commit is contained in:
@ -63,7 +63,7 @@ def convert(number: int) -> str:
|
||||
current = temp_num % 10
|
||||
if counter % 2 == 0:
|
||||
addition = ""
|
||||
if counter in placevalue.keys() and current != 0:
|
||||
if counter in placevalue and current != 0:
|
||||
addition = placevalue[counter]
|
||||
if counter == 2:
|
||||
words = singles[current] + addition + words
|
||||
@ -84,12 +84,12 @@ def convert(number: int) -> str:
|
||||
words = teens[number % 10] + words
|
||||
else:
|
||||
addition = ""
|
||||
if counter in placevalue.keys():
|
||||
if counter in placevalue:
|
||||
addition = placevalue[counter]
|
||||
words = doubles[current] + addition + words
|
||||
else:
|
||||
addition = ""
|
||||
if counter in placevalue.keys():
|
||||
if counter in placevalue:
|
||||
if current == 0 and ((temp_num % 100) // 10) == 0:
|
||||
addition = ""
|
||||
else:
|
||||
|
@ -105,7 +105,7 @@ def test_instagram_user(username: str = "github") -> None:
|
||||
import os
|
||||
|
||||
if os.environ.get("CI"):
|
||||
return None # test failing on GitHub Actions
|
||||
return # test failing on GitHub Actions
|
||||
instagram_user = InstagramUser(username)
|
||||
assert instagram_user.user_data
|
||||
assert isinstance(instagram_user.user_data, dict)
|
||||
|
@ -7,10 +7,7 @@ from bs4 import BeautifulSoup
|
||||
from fake_useragent import UserAgent
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(argv) > 1:
|
||||
query = "%20".join(argv[1:])
|
||||
else:
|
||||
query = quote(str(input("Search: ")))
|
||||
query = "%20".join(argv[1:]) if len(argv) > 1 else quote(str(input("Search: ")))
|
||||
|
||||
print("Googling.....")
|
||||
|
||||
|
Reference in New Issue
Block a user