[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
a3a7e19b07
commit
d75b0ae8ab
@ -36,6 +36,7 @@ def get_opt(opts, expr, flags=None):
|
||||
return match.group(0)
|
||||
return None
|
||||
|
||||
|
||||
def find_opt(opts, expr):
|
||||
"""
|
||||
Return if available the float after the expression.
|
||||
@ -49,6 +50,7 @@ def find_opt(opts, expr):
|
||||
return True, None
|
||||
return False, None
|
||||
|
||||
|
||||
# Define a context manager to temporarily mute print statements
|
||||
@contextlib.contextmanager
|
||||
def mute_print():
|
||||
|
@ -63,7 +63,7 @@ import re
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import pypsa
|
||||
from _helpers import configure_logging, get_opt, find_opt
|
||||
from _helpers import configure_logging, find_opt, get_opt
|
||||
from add_electricity import load_costs, update_transmission_costs
|
||||
from pypsa.descriptors import expand_series
|
||||
|
||||
|
@ -598,7 +598,7 @@ def extra_functionality(n, snapshots):
|
||||
if reserve.get("activate"):
|
||||
add_operational_reserve_margin(n, snapshots, config)
|
||||
|
||||
EQ_config = constraints.get("EQ",False)
|
||||
EQ_config = constraints.get("EQ", False)
|
||||
EQ_wildcard = get_opt(opts, r"^EQ+[0-9]*\.?[0-9]+(c|)")[2:]
|
||||
EQ_o = EQ_wildcard or EQ_config
|
||||
if EQ_o:
|
||||
|
Loading…
Reference in New Issue
Block a user