Skip to content

Commit

Permalink
Merge branch 'black_2023_fixes' into 'main'
Browse files Browse the repository at this point in the history
stick to black 2023 style

See merge request FINAM/finam!252
  • Loading branch information
MuellerSeb committed Feb 2, 2023
2 parents c9cc355 + 90611f8 commit 91af90a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ stages:
check:
stage: test
before_script:
- pip3 install black 'pylint<3' 'isort[colors]<6'
- pip3 install 'black>=23,<24' 'pylint<3' 'isort[colors]<6'
script:
- pip3 install --editable .
- black --check --diff --color .
Expand Down
2 changes: 0 additions & 2 deletions src/finam/adapters/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ class LinearTime(TimeCachingAdapter):
"""

def _interpolate(self, time):

if len(self.data) == 1:
return self.data[0][1]

Expand Down Expand Up @@ -456,7 +455,6 @@ def __init__(self, step=0.5):
self.step = step

def _interpolate(self, time):

if len(self.data) == 1:
return self.data[0][1]

Expand Down
2 changes: 1 addition & 1 deletion src/finam/modules/writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _update(self):

def _update_rows(self, values):
with ErrorLogger(self.logger):
for (value, name) in zip(values, self._input_names):
for value, name in zip(values, self._input_names):
dtools.assert_type(self, name, value.item(), [int, float])

self._rows.append([self.time.isoformat()] + values)
Expand Down
1 change: 0 additions & 1 deletion src/finam/sdk/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Abstract base implementations for components with and without time step.
"""
import collections
import datetime
import logging
from abc import ABC
from datetime import datetime
Expand Down
7 changes: 5 additions & 2 deletions src/finam/tools/date_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@


def is_timedelta(value):
"""Tests if a value is an instance of
:class:`timedelta <datetime.timedelta>` or :class:`relativedelta <dateutil.relativedelta.relativedelta>`."""
"""
Tests if a value is an instance of
:class:`timedelta <datetime.timedelta>` or
:class:`relativedelta <dateutil.relativedelta.relativedelta>`.
"""
if isinstance(value, timedelta):
return True

Expand Down
1 change: 0 additions & 1 deletion tests/adapters/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def test_grid_to_value_sum(self):

class TestValueToGrid(unittest.TestCase):
def setUp(self):

self.source = CallbackGenerator(
callbacks={
"Value": (
Expand Down
1 change: 0 additions & 1 deletion tests/core/test_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,6 @@ def test_memory_limit(self):
info = Info(time=t, grid=fm.UniformGrid((100, 100)))

with tempfile.TemporaryDirectory() as td:

out = Output(name="Output")
out.memory_limit = 0
out.memory_location = td
Expand Down

0 comments on commit 91af90a

Please sign in to comment.