fixing code formatting
MODIFY
rasa_sdk/__main__.py
rasa_sdk/__main__.py
@@ -9,7 +9,9 @@ def main_from_args(args):
logging.getLogger("matplotlib").setLevel(logging.WARN)
utils.configure_colored_logging(args.loglevel)
- utils.configure_file_logging(logging.getLogger(APPLICATION_ROOT_LOGGER_NAME), args.log_file, args.loglevel)
+ utils.configure_file_logging(
+ logging.getLogger(APPLICATION_ROOT_LOGGER_NAME), args.log_file, args.loglevel
+ )
utils.update_sanic_log_level()
run(

MODIFY
rasa_sdk/utils.py
rasa_sdk/utils.py
@@ -95,7 +95,9 @@ def configure_colored_logging(loglevel):
)
-def configure_file_logging(logger_obj: logging.Logger, log_file: Optional[Text], loglevel: int) -> None:
+def configure_file_logging(
+ logger_obj: logging.Logger, log_file: Optional[Text], loglevel: int
+) -> None:
"""Configure logging to a file.
Args:
@@ -109,7 +111,9 @@ def configure_file_logging(logger_obj: logging.Logger, log_file: Optional[Text],
if not loglevel:
loglevel = logging.INFO
- formatter = logging.Formatter("%(asctime)s [%(levelname)-5.5s] %(name)s - %(message)s")
+ formatter = logging.Formatter(
+ "%(asctime)s [%(levelname)-5.5s] %(name)s - %(message)s"
+ )
file_handler = logging.FileHandler(log_file, encoding="utf-8")
file_handler.setLevel(loglevel)
file_handler.setFormatter(formatter)

fixing code formatting