Skip to content

Commit

Permalink
chore: lint install fix
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Aug 14, 2024
1 parent 325b4c8 commit 5d4aebf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ repos:
- id: isort

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

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
rev: 7.1.1
hooks:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
rev: v1.11.1
hooks:
- id: mypy
additional_dependencies: [types-requests, types-setuptools, pydantic, types-pkg-resources]
additional_dependencies: [types-requests, types-setuptools, pydantic]

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
Expand Down
2 changes: 1 addition & 1 deletion ape_solidity/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from solcx.exceptions import SolcError
from solcx.install import get_executable

from ape_solidity._models import ImportRemappingCache, SourceTree
from ape_solidity._utils import (
OUTPUT_SELECTION,
Extension,
Expand All @@ -48,7 +49,6 @@
SolcCompileError,
SolcInstallError,
)
from ape_solidity._models import ImportRemappingCache, SourceTree

LICENSES_PATTERN = re.compile(r"(// SPDX-License-Identifier:\s*([^\n]*)\s)")

Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
"pytest-benchmark", # For performance tests
],
"lint": [
"black>=24.4.2,<25", # Auto-formatter and linter
"mypy>=1.10.0,<2", # Static type analyzer
"black>=24.8.0,<25", # Auto-formatter and linter
"mypy>=1.11.1,<2", # Static type analyzer
"types-requests", # Needed for mypy type shed
"types-setuptools", # Needed for mypy type shed
"types-pkg-resources", # Needed for type checking tests
"flake8>=7.0.0,<8", # Style linter
"flake8>=7.1.1,<8", # Style linter
"isort>=5.13.2,<6", # Import sorting linter
"mdformat>=0.7.17", # Auto-formatter for markdown
"mdformat-gfm>=0.3.5", # Needed for formatting GitHub-flavored markdown
Expand Down
4 changes: 2 additions & 2 deletions tests/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ def test_get_imports_dependencies(project, compiler):
path = project.sources.lookup(source_id)
import_ls = compiler.get_imports((path,), project=project)
actual = import_ls[source_id]

# NOTE: Both Yearn-vaults master branch and yearn-vaults 0.4.5
# use OpenZeppelin 4.7.1. However, the root project for these
# tests uses OpenZeppelin 4.5.0. This proves we are handling
# dependencies-of-dependencies correctly.

token_path = "contracts/.cache/openzeppelin/4.7.1/contracts/token"
expected = [
f"{token_path}/ERC20/ERC20.sol",
Expand Down

0 comments on commit 5d4aebf

Please sign in to comment.