Skip to content

Commit b0ddb72

Browse files
committed
MNT: Use flake8 linter
1 parent ad1c2ee commit b0ddb72

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ jobs:
3939
- run: pip install -U .[test]
4040

4141
- if: matrix.test-type == 'lint'
42-
run: ruff backtesting
42+
run: flake8 backtesting setup.py
4343
- if: matrix.test-type == 'lint'
4444
run: mypy backtesting
4545
- if: matrix.test-type == 'lint'
4646
env: { BOKEH_BROWSER: none }
4747
run: time catchsegv coverage run -m backtesting.test
4848
- if: matrix.test-type == 'lint'
49-
run: bash <(curl -s https://codecov.io/bash)
49+
run: coverage report
5050

5151
- if: '! matrix.test-type'
5252
env: { BOKEH_BROWSER: none }

backtesting/lib.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def func(x, *_, **__):
305305
strategy_I = frame.f_locals['self'].I # type: ignore
306306
break
307307
else:
308-
def strategy_I(func, *args, **kwargs):
308+
def strategy_I(func, *args, **kwargs): # noqa: F811
309309
return func(*args, **kwargs)
310310

311311
def wrap_func(resampled, *args, **kwargs):

backtesting/test/_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,8 @@ def test_resample(self):
750750
bt = Backtest(GOOG, SmaCross)
751751
bt.run()
752752
import backtesting._plotting
753-
with _tempfile() as f,\
754-
patch.object(backtesting._plotting, '_MAX_CANDLES', 10),\
753+
with _tempfile() as f, \
754+
patch.object(backtesting._plotting, '_MAX_CANDLES', 10), \
755755
self.assertWarns(UserWarning):
756756
bt.plot(filename=f, resample=True)
757757
# Give browser time to open before tempfile is removed

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
max-line-length = 100
2+
max-line-length = 120
33
exclude =
44
.git,
55
.eggs,

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
'sambo',
5050
],
5151
'dev': [
52-
'ruff==0.0.160',
52+
'flake8',
5353
'coverage',
5454
'mypy',
5555
],

0 commit comments

Comments
 (0)