Skip to content

Commit

Permalink
🔧 Create pre-commit-config.yaml + isort dev dep
Browse files Browse the repository at this point in the history
  • Loading branch information
Guido W. Pettinari authored and coccoinomane committed Dec 17, 2022
1 parent a076fc3 commit 9e6a1c1
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
name: black

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
additional_dependencies: [types-setuptools]

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
hooks:
- id: mdformat
additional_dependencies: [mdformat-gfm, mdformat-frontmatter]

default_language_version:
python: python3
3 changes: 3 additions & 0 deletions .vscode/settings.suggested.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"python.formatting.blackPath": "/usr/local/bin/black",
"python.formatting.provider": "black",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"files.exclude": {
"**/__pycache__": true,
"**/.pytest_cache": true,
Expand Down
102 changes: 100 additions & 2 deletions pdm.lock

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

6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ dev = [
"pytest>=6.2.5",
"mypy>=0.982",
"eth-brownie>=1.19.2",
"isort>=5.11.3",
"pre-commit>=2.20.0",
]

[tool.pdm.scripts]
Expand Down Expand Up @@ -86,3 +88,7 @@ markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"local: tests that require a local blockchain to be run, e.g. ganache or hardhat network (deselect with '-m \"not local\"')",
]

[tool.isort]
profile = "black"
src_paths = ["src", "tests"]

0 comments on commit 9e6a1c1

Please sign in to comment.