mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix: linting
This commit is contained in:
@@ -18,7 +18,9 @@ class TestPasswordGenerator(unittest.TestCase):
|
||||
def test_password_content(self):
|
||||
password = password_generator.generate_password()
|
||||
self.assertTrue(any(c.isdigit() for c in password))
|
||||
self.assertTrue(any(c in password_generator.string.punctuation for c in password))
|
||||
self.assertTrue(
|
||||
any(c in password_generator.string.punctuation for c in password)
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
from sample_code import multiply_int
|
||||
# from sample_code import multiply_int
|
||||
|
||||
|
||||
def test_multiply_int(num: int, multiplier, expected_result: int) -> None:
|
||||
result = multiply_int(num, multiplier)
|
||||
print(result)
|
||||
assert (
|
||||
result == expected_result
|
||||
), f"AssertionError: Expected the output to be {expected_result}"
|
||||
# def test_multiply_int(num: int, multiplier, expected_result: int) -> None:
|
||||
# result = multiply_int(num, multiplier)
|
||||
# print(result)
|
||||
# assert (
|
||||
# result == expected_result
|
||||
# ), f"AssertionError: Expected the output to be {expected_result}"
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# create a trivial test that has 4 as the num, and 2 as the multiplier. Make sure to fill in the expected result
|
||||
num =
|
||||
multiplier =
|
||||
expected_result =
|
||||
test_multiply_int()
|
||||
# if __name__ == "__main__":
|
||||
# # create a trivial test that has 4 as the num, and 2 as the multiplier. Make sure to fill in the expected result
|
||||
# num =
|
||||
# multiplier =
|
||||
# expected_result =
|
||||
# test_multiply_int()
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from typing import List
|
||||
|
||||
from import
|
||||
|
||||
|
||||
def test_two_sum(nums: List, target: int, expected_result: List[int]) -> None:
|
||||
result = two_sum(nums, target)
|
||||
|
||||
@@ -21,7 +21,6 @@ def generate_password(length: int = 8) -> str:
|
||||
|
||||
if __name__ == "__main__":
|
||||
password_length = (
|
||||
int(sys.argv[sys.argv.index("--length") + 1])
|
||||
if "--length" in sys.argv else 8
|
||||
int(sys.argv[sys.argv.index("--length") + 1]) if "--length" in sys.argv else 8
|
||||
)
|
||||
print(generate_password(password_length))
|
||||
|
||||
@@ -18,7 +18,9 @@ class TestPasswordGenerator(unittest.TestCase):
|
||||
def test_password_content(self):
|
||||
password = password_generator.generate_password()
|
||||
self.assertTrue(any(c.isdigit() for c in password))
|
||||
self.assertTrue(any(c in password_generator.string.punctuation for c in password))
|
||||
self.assertTrue(
|
||||
any(c in password_generator.string.punctuation for c in password)
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
from typing import Dict
|
||||
|
||||
from abstract_class import (AbstractBattleship, Game, GameStatus,
|
||||
ShipPlacement, Turn, TurnResponse)
|
||||
from abstract_class import (
|
||||
AbstractBattleship,
|
||||
Game,
|
||||
GameStatus,
|
||||
ShipPlacement,
|
||||
Turn,
|
||||
TurnResponse,
|
||||
)
|
||||
|
||||
|
||||
class Battleship(AbstractBattleship):
|
||||
|
||||
@@ -258,7 +258,8 @@ class WebArenaChallengeSpec(BaseModel):
|
||||
f"{' and '.join(s.base_url for s in sites)}.\n\n"
|
||||
+ "\n".join(
|
||||
s.additional_info.format(url=s.base_url)
|
||||
for s in sites if s.additional_info
|
||||
for s in sites
|
||||
if s.additional_info
|
||||
)
|
||||
).strip()
|
||||
|
||||
@@ -462,7 +463,7 @@ class WebArenaChallenge(BaseChallenge):
|
||||
|
||||
|
||||
def load_webarena_challenges(
|
||||
skip_unavailable: bool = True
|
||||
skip_unavailable: bool = True,
|
||||
) -> Iterator[type[WebArenaChallenge]]:
|
||||
logger.info("Loading WebArena challenges...")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user