[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-01-18 13:18:25 +00:00
parent ecb0a1f79f
commit 35f1c06f75

View File

@ -103,16 +103,18 @@ def configure_logging(snakemake, skip_handlers=False):
} }
) )
logging.basicConfig(**kwargs) logging.basicConfig(**kwargs)
# Setup a function to handle uncaught exceptions and include them with their stacktrace into logfiles # Setup a function to handle uncaught exceptions and include them with their stacktrace into logfiles
def handle_exception(exc_type, exc_value, exc_traceback): def handle_exception(exc_type, exc_value, exc_traceback):
# Log the exception # Log the exception
logger = logging.getLogger() logger = logging.getLogger()
logger.error("Uncaught exception", logger.error(
exc_info=(exc_type, exc_value, exc_traceback)) "Uncaught exception", exc_info=(exc_type, exc_value, exc_traceback)
)
sys.excepthook = handle_exception sys.excepthook = handle_exception
def update_p_nom_max(n): def update_p_nom_max(n):
# if extendable carriers (solar/onwind/...) have capacity >= 0, # if extendable carriers (solar/onwind/...) have capacity >= 0,
# e.g. existing assets from the OPSD project are included to the network, # e.g. existing assets from the OPSD project are included to the network,