mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
Fix flake8 E303,W293,W291,W292,E305
Some of the previously fixed things creeped in. I would like to keep the requirements low on the PR authors for now and gradually improve the pep8 compliance without introducing much breakage.
This commit is contained in:
@@ -45,6 +45,7 @@ def improve_code(suggestions: List[str], code: str) -> str:
|
|||||||
result_string = call_ai_function(function_string, args, description_string)
|
result_string = call_ai_function(function_string, args, description_string)
|
||||||
return result_string
|
return result_string
|
||||||
|
|
||||||
|
|
||||||
def write_tests(code: str, focus: List[str]) -> str:
|
def write_tests(code: str, focus: List[str]) -> str:
|
||||||
"""
|
"""
|
||||||
A function that takes in code and focus topics and returns a response from create chat completion api call.
|
A function that takes in code and focus topics and returns a response from create chat completion api call.
|
||||||
|
|||||||
@@ -164,8 +164,6 @@ class ConsoleHandler(logging.StreamHandler):
|
|||||||
Allows to handle custom placeholders 'title_color' and 'message_no_color'.
|
Allows to handle custom placeholders 'title_color' and 'message_no_color'.
|
||||||
To use this formatter, make sure to pass 'color', 'title' as log extras.
|
To use this formatter, make sure to pass 'color', 'title' as log extras.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
class AutoGptFormatter(logging.Formatter):
|
class AutoGptFormatter(logging.Formatter):
|
||||||
def format(self, record: LogRecord) -> str:
|
def format(self, record: LogRecord) -> str:
|
||||||
if (hasattr(record, 'color')):
|
if (hasattr(record, 'color')):
|
||||||
|
|||||||
2
tests.py
2
tests.py
@@ -3,6 +3,6 @@ import unittest
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# Load all tests from the 'scripts/tests' package
|
# Load all tests from the 'scripts/tests' package
|
||||||
suite = unittest.defaultTestLoader.discover('scripts/tests')
|
suite = unittest.defaultTestLoader.discover('scripts/tests')
|
||||||
|
|
||||||
# Run the tests
|
# Run the tests
|
||||||
unittest.TextTestRunner().run(suite)
|
unittest.TextTestRunner().run(suite)
|
||||||
|
|||||||
Reference in New Issue
Block a user