mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
fix: Fix flake8 linting errors
This commit is contained in:
@@ -67,6 +67,7 @@ def execute_python_file(file):
|
||||
except Exception as e:
|
||||
return f"Error: {str(e)}"
|
||||
|
||||
|
||||
def execute_shell(command_line):
|
||||
|
||||
current_dir = os.getcwd()
|
||||
|
||||
@@ -161,11 +161,11 @@ class ConsoleHandler(logging.StreamHandler):
|
||||
self.handleError(record)
|
||||
|
||||
|
||||
'''
|
||||
Allows to handle custom placeholders 'title_color' and 'message_no_color'.
|
||||
To use this formatter, make sure to pass 'color', 'title' as log extras.
|
||||
'''
|
||||
class AutoGptFormatter(logging.Formatter):
|
||||
"""
|
||||
Allows to handle custom placeholders 'title_color' and 'message_no_color'.
|
||||
To use this formatter, make sure to pass 'color', 'title' as log extras.
|
||||
"""
|
||||
def format(self, record: LogRecord) -> str:
|
||||
if (hasattr(record, 'color')):
|
||||
record.title_color = getattr(record, 'color') + getattr(record, 'title') + " " + Style.RESET_ALL
|
||||
|
||||
@@ -4,7 +4,6 @@ from config import AbstractSingleton, Config
|
||||
import openai
|
||||
cfg = Config()
|
||||
|
||||
cfg = Config()
|
||||
|
||||
def get_ada_embedding(text):
|
||||
text = text.replace("\n", " ")
|
||||
|
||||
Reference in New Issue
Block a user