Skip to content

Commit

Permalink
Remove all references to flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Quexington committed Oct 31, 2024
1 parent 83e44de commit 3af739d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 73 deletions.
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/upload-pypi-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ jobs:
check:
- name: black
command: black --check --diff .
- name: flake8
command: flake8 benchmarks build_scripts chia tools *.py
- name: generated protocol tests
command: |
python3 -m chia._tests.util.build_network_protocol_files
Expand Down
7 changes: 0 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ repos:
entry: ./activated.py mypy
language: system
pass_filenames: false
- repo: local
hooks:
- id: flake8
name: Flake8
entry: ./activated.py flake8
language: system
types: [python]
- repo: local
hooks:
- id: ruff
Expand Down
12 changes: 5 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,13 @@ to configure how the tests are run. For example, for more logging: change the lo
```bash
sh install.sh -d
. ./activate
black . && ruff check --fix && mypy && flake8 benchmarks build_scripts chia tests tools *.py && pylint benchmarks build_scripts chia tests tools *.py
black . && ruff check --fix && mypy && pylint benchmarks build_scripts chia tests tools *.py
py.test tests -v --durations 0
```

The [black library](https://black.readthedocs.io/en/stable/) is used as an automatic style formatter to make things easier.
The [flake8 library](https://readthedocs.org/projects/flake8/) helps ensure consistent style.
The [Mypy library](https://mypy.readthedocs.io/en/stable/) is very useful for ensuring objects are of the correct type, so try to always add the type of the return value, and the type of local variables.
The [Ruff library](https://docs.astral.sh) is used to sort, group, validate imports, and further lint all of the python files
The [Ruff library](https://docs.astral.sh) is used to sort, group, validate imports, ensure consistent style, and further lint all of the python files

If you want verbose logging for tests, edit the `tests/pytest.ini` file.

Expand All @@ -83,10 +82,9 @@ provided configuration with `pre-commit install`.
1. Install python extension
2. Set the environment to `./venv/bin/python`
3. Install mypy plugin
4. Preferences > Settings > Python > Linting > flake8 enabled
5. Preferences > Settings > Python > Linting > mypy enabled
6. Preferences > Settings > Formatting > Python > Provider > black
7. Preferences > Settings > mypy > Targets: set to `./chia`
4. Preferences > Settings > Python > Linting > mypy enabled
5. Preferences > Settings > Formatting > Python > Provider > black
6. Preferences > Settings > mypy > Targets: set to `./chia`

## Configure Pycharm

Expand Down
53 changes: 2 additions & 51 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ black = { version = "24.8.0", optional = true }
build = { version = "1.2.1", optional = true }
coverage = { version = "7.6.4", optional = true }
diff-cover = { version = "9.2.0", optional = true }
flake8 = { version = "7.1.1", optional = true }
# TODO: but... keyrings_cryptfile goes 15 minutes without locking while this does in 75 seconds
"keyrings.cryptfile" = { version = "1.3.9", optional = true }
mypy = { version = "1.11.1", optional = true }
Expand All @@ -106,7 +105,7 @@ ruff = { version = "0.7.1", optional = true }


[tool.poetry.extras]
dev = ["aiohttp_cors", "black", "build", "coverage", "diff-cover", "flake8", "mypy", "pre-commit", "py3createtorrent", "pyinstaller", "pytest", "pytest-cov", "pytest-mock", "pytest-monitor", "pytest-xdist", "ruff", "types-aiofiles", "types-cryptography", "types-pyyaml", "types-setuptools", "lxml"]
dev = ["aiohttp_cors", "black", "build", "coverage", "diff-cover", "mypy", "pre-commit", "py3createtorrent", "pyinstaller", "pytest", "pytest-cov", "pytest-mock", "pytest-monitor", "pytest-xdist", "ruff", "types-aiofiles", "types-cryptography", "types-pyyaml", "types-setuptools", "lxml"]
upnp = ["miniupnpc"]
legacy_keyring = ["keyrings.cryptfile"]

Expand Down

0 comments on commit 3af739d

Please sign in to comment.