mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Remove flake8 in favor of ruff
This commit is contained in:
parent
549a0e1c44
commit
b4ea37d598
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
@ -90,10 +90,6 @@ jobs:
|
|||
freqtrade create-userdir --userdir user_data
|
||||
freqtrade hyperopt --datadir tests/testdata -e 6 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all
|
||||
|
||||
- name: Flake8
|
||||
run: |
|
||||
flake8
|
||||
|
||||
- name: Sort imports (isort)
|
||||
run: |
|
||||
isort --check .
|
||||
|
@ -190,10 +186,6 @@ jobs:
|
|||
freqtrade create-userdir --userdir user_data
|
||||
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all
|
||||
|
||||
- name: Flake8
|
||||
run: |
|
||||
flake8
|
||||
|
||||
- name: Sort imports (isort)
|
||||
run: |
|
||||
isort --check .
|
||||
|
@ -256,10 +248,6 @@ jobs:
|
|||
freqtrade create-userdir --userdir user_data
|
||||
freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all
|
||||
|
||||
- name: Flake8
|
||||
run: |
|
||||
flake8
|
||||
|
||||
- name: Ruff - linting
|
||||
run: |
|
||||
ruff check .
|
||||
|
|
|
@ -45,16 +45,17 @@ pytest tests/test_<file_name>.py::test_<method_name>
|
|||
|
||||
### 2. Test if your code is PEP8 compliant
|
||||
|
||||
#### Run Flake8
|
||||
#### Run Ruff
|
||||
|
||||
```bash
|
||||
flake8 freqtrade tests scripts
|
||||
ruff .
|
||||
```
|
||||
|
||||
We receive a lot of code that fails the `flake8` checks.
|
||||
We receive a lot of code that fails the `ruff` checks.
|
||||
To help with that, we encourage you to install the git pre-commit
|
||||
hook that will warn you when you try to commit code that fails these checks.
|
||||
Guide for installing them is [here](http://flake8.pycqa.org/en/latest/user/using-hooks.html).
|
||||
hook that will warn you when you try to commit code that fails these checks.
|
||||
|
||||
you can manually run pre-commit with `pre-commit run -a`.
|
||||
|
||||
##### Additional styles applied
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ This will spin up a local server (usually on port 8000) so you can see if everyt
|
|||
To configure a development environment, you can either use the provided [DevContainer](#devcontainer-setup), or use the `setup.sh` script and answer "y" when asked "Do you want to install dependencies for dev [y/N]? ".
|
||||
Alternatively (e.g. if your system is not supported by the setup.sh script), follow the manual installation process and run `pip3 install -e .[all]`.
|
||||
|
||||
This will install all required tools for development, including `pytest`, `flake8`, `mypy`, and `coveralls`.
|
||||
This will install all required tools for development, including `pytest`, `ruff`, `mypy`, and `coveralls`.
|
||||
|
||||
Then install the git hook scripts by running `pre-commit install`, so your changes will be verified locally before committing.
|
||||
This avoids a lot of waiting for CI already, as some basic formatting checks are done locally on your machine.
|
||||
|
|
|
@ -41,7 +41,6 @@ dependencies:
|
|||
# 2/4 req dev
|
||||
|
||||
- coveralls
|
||||
- flake8
|
||||
- mypy
|
||||
- pytest
|
||||
- pytest-asyncio
|
||||
|
@ -70,6 +69,6 @@ dependencies:
|
|||
- tables
|
||||
- pytest-random-order
|
||||
- ccxt
|
||||
- flake8-tidy-imports
|
||||
- ruff
|
||||
- -e .
|
||||
# - python-rapidjso
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
-r docs/requirements-docs.txt
|
||||
|
||||
coveralls==3.3.1
|
||||
flake8==6.0.0
|
||||
flake8-tidy-imports==4.8.0
|
||||
ruff==0.0.251
|
||||
mypy==1.0.1
|
||||
pre-commit==3.0.4
|
||||
|
|
Loading…
Reference in New Issue
Block a user