Add ruff linting to pre-commit and github actions workflow

pull/3165/head
Owen Campbell 2023-06-29 11:58:18 +01:00
parent ee98662c90
commit 7554837934
No known key found for this signature in database
GPG Key ID: 628F79BCBE9C2B73
5 changed files with 763 additions and 712 deletions

View File

@ -43,6 +43,9 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Lint with ruff
run: ruff --format=github nucypher
- name: Check CLI Entrypoint
run: nucypher --help

View File

@ -42,17 +42,13 @@ repos:
rev: 1.6.1
hooks:
- id: darker
args: [--isort]
additional_dependencies:
- isort~=5.9
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.275'
hooks:
- id: ruff
# TODO: May be incrementally introduced
# - repo: https://gitlab.com/pycqa/flake8
# rev: '3.7.9'
# hooks:
# - id: flake8
# - repo: https://github.com/psf/black
# rev: stable
# hooks:

View File

@ -32,7 +32,6 @@ eth-tester = "*" # providers.py still uses this
py-evm = "*"
web3 = ">=6.0.0"
watchdog = "<3.0.0" # needed for eth-ape to be happy
eth-utils = "*"
# CLI / Configuration
appdirs = "*"
@ -42,7 +41,6 @@ tabulate = "*"
# Template
jinja2 = "<3.1.0" # because of docs
[dev-packages]
# Pytest
# See https://github.com/pytest-dev/pytest/issues/9703
@ -57,6 +55,7 @@ ape-solidity = ">=0.6.5"
hypothesis = "*"
pre-commit = "2.12.1"
coverage = "<=6.5.0"
ruff = "*"
[scripts]
nucypher = "python3 nucypher/cli/main.py"

1450
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -39,3 +39,10 @@
directory = "dev"
name = "Internal Development Tasks"
showcontent = true
[tool.ruff]
select = ["E", "F", "I"]
ignore = ["E501"]
[tool.ruff.isort]
known-first-party = ["nucypher"]