Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit e396a96

Browse files
committed
Style fixes
1 parent 8b91549 commit e396a96

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
python setup.py sdist bdist_wheel
3232
3333
- name: Publish package to PyPI
34-
uses: pypa/gh-action-pypi-publish@master
34+
uses: pypa/gh-action-pypi-publish@release/v1
3535
with:
3636
user: __token__
3737
password: ${{ secrets.PYPI_PASSWORD }}

bluepyopt/deapext/algorithms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def eaAlphaMuPlusLambdaCheckpoint(
160160
gen = start_gen + 1
161161
stopping_params = {"gen": gen}
162162
while utils.run_next_gen(
163-
not(_check_stopping_criteria(stopping_criteria, stopping_params)),
163+
not (_check_stopping_criteria(stopping_criteria, stopping_params)),
164164
terminator):
165165
offspring = _get_offspring(parents, toolbox, cxpb, mutpb)
166166

@@ -175,7 +175,7 @@ def eaAlphaMuPlusLambdaCheckpoint(
175175

176176
logger.info(logbook.stream)
177177

178-
if(cp_filename and cp_frequency and
178+
if (cp_filename and cp_frequency and
179179
gen % cp_frequency == 0):
180180
cp = dict(population=population,
181181
generation=gen,

bluepyopt/ephys/parameterscalers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def __init__(
122122
self.dist_param_names = dist_param_names
123123
self.soma_ref_location = soma_ref_location
124124

125-
if not(0. <= self.soma_ref_location <= 1.):
125+
if not (0. <= self.soma_ref_location <= 1.):
126126
raise ValueError('soma_ref_location must be between 0 and 1.')
127127

128128
if self.dist_param_names is not None:

bluepyopt/ephys/serializer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@ def _serializer(value):
2525
elif isinstance(value, (list, tuple)) and \
2626
value and hasattr(value[0], 'to_dict'):
2727
return [v.to_dict() for v in value]
28-
elif(isinstance(value, dict) and value and
29-
hasattr(next(iter(list(value.values()))), 'to_dict')):
28+
elif (isinstance(value, dict) and value and
29+
hasattr(
30+
next(iter(list(value.values()))), 'to_dict')):
3031
return {k: v.to_dict() for k, v in list(value.items())}
3132
return value
3233

3334
@staticmethod
3435
def _deserializer(value):
3536
"""_deserializer"""
36-
if(isinstance(value, list) and value and
37+
if (isinstance(value, list) and value and
3738
isinstance(value[0], dict) and SENTINAL in value[0]):
3839
return [instantiator(v) for v in value]
3940
elif isinstance(value, dict) and value:

bluepyopt/tests/test_deapext/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def catch_event(event):
2323

2424
# event is set by another process case
2525
time.sleep(2)
26-
assert not(utils.run_next_gen(True, event))
26+
assert not (utils.run_next_gen(True, event))
2727

2828

2929
@pytest.mark.unit

0 commit comments

Comments
 (0)