Skip to content

Commit

Permalink
Run recent black version
Browse files Browse the repository at this point in the history
  • Loading branch information
jnnr committed Feb 15, 2023
1 parent bc594e8 commit b6a377b
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/oemof/tabular/constraint_facades.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def build_constraint(self, model):

# check if there are flows with key
flows = {}
for (i, o) in model.flows:
for i, o in model.flows:
if hasattr(model.flows[i, o], self.keyword):
flows[(i, o)] = model.flows[i, o]

Expand Down
1 change: 0 additions & 1 deletion src/oemof/tabular/datapackage/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ def download_data(url, directory="cache", unzip_file=None, **kwargs):
return filepath

else:

if scheme in ["http", "https"]:
_http(url, copypath)

Expand Down
2 changes: 0 additions & 2 deletions src/oemof/tabular/datapackage/reading.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ def resolve_foreign_keys(source):
and key in data
and source[key] in data[key]
):

source[key] = data[key][source[key]]

if isinstance(source[key], cabc.MutableMapping):
Expand Down Expand Up @@ -504,7 +503,6 @@ def listify(x, n=None):
resources.append(r)

for resource in resources:

resource_data = resource.read(keyed=True, relations=True)

for rw in resource_data:
Expand Down
1 change: 0 additions & 1 deletion src/oemof/tabular/facades.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def kwargs_to_parent(cls):
original_init = cls.__init__

def new_init(self, *args, **kwargs):

# pass only those kwargs to the dataclass which are expected
dataclass_kwargs = {
key: value
Expand Down
2 changes: 1 addition & 1 deletion tests/test_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def normalize_to_positive_results(lines):
+ 1
for nri in negative_result_indices
]
for (start, end) in zip(equation_start_indices, negative_result_indices):
for start, end in zip(equation_start_indices, negative_result_indices):
for n in range(start, end):
lines[n] = (
"-"
Expand Down
1 change: 0 additions & 1 deletion tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def test_example_datapackage_readability():
for example in pkg.resource_listdir(
"oemof.tabular", "examples/datapackages"
):

print("Runnig reading datapackage example {} ...".format(example))
systems.append(
ES.from_datapackage(
Expand Down

0 comments on commit b6a377b

Please sign in to comment.