Skip to content

Commit

Permalink
chore: lint upgrades (#2318)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Oct 14, 2024
1 parent c230a91 commit 6271dc5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml

Expand All @@ -10,7 +10,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
name: black
Expand All @@ -22,7 +22,7 @@ repos:
additional_dependencies: [flake8-breakpoint, flake8-print, flake8-pydantic]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies: [
Expand All @@ -37,7 +37,7 @@ repos:
]

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
rev: 0.7.18
hooks:
- id: mdformat
additional_dependencies: [mdformat-gfm, mdformat-frontmatter, mdformat-pyproject]
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"hypothesis-jsonschema==0.19.0", # JSON Schema fuzzer extension
],
"lint": [
"black>=24.8.0,<25", # Auto-formatter and linter
"mypy>=1.11.1,<2", # Static type analyzer
"black>=24.10.0,<25", # Auto-formatter and linter
"mypy>=1.11.2,<2", # Static type analyzer
"types-PyYAML", # Needed due to mypy typeshed
"types-requests", # Needed due to mypy typeshed
"types-setuptools", # Needed due to mypy typeshed
Expand All @@ -35,7 +35,7 @@
"flake8-print>=4.0.1,<5", # Detect print statements left in code
"flake8-pydantic", # For detecting issues with Pydantic models
"isort>=5.13.2,<6", # Import sorting linter
"mdformat>=0.7.17", # Auto-formatter for markdown
"mdformat>=0.7.18", # Auto-formatter for markdown
"mdformat-gfm>=0.3.5", # Needed for formatting GitHub-flavored markdown
"mdformat-frontmatter>=0.4.1", # Needed for frontmatters-style headers in issue templates
"mdformat-pyproject>=0.0.1", # Allows configuring in pyproject.toml
Expand Down
1 change: 1 addition & 0 deletions src/ape/utils/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def _parse_coverage_table(coverage: "CoverageReport", statement: bool = True) ->

def _parse_verbose_coverage(coverage: "CoverageReport", statement: bool = True) -> list[Table]:
tables = []
row: tuple[str, ...]
for project in coverage.projects:
for src in project.sources:
for contract in src.contracts:
Expand Down
4 changes: 2 additions & 2 deletions src/ape_ethereum/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ def get_receipt(
)
hex_hash = HexBytes(txn_hash)

txn = {}
txn: dict = {}
if transaction := kwargs.get("transaction"):
# perf: If called `send_transaction()`, we should already have the data!
txn = (
Expand Down Expand Up @@ -1223,7 +1223,7 @@ def get_virtual_machine_error(self, exception: Exception, **kwargs) -> VirtualMa
# Maybe it is a JSON-str.
# NOTE: For some reason, it comes back with single quotes though.
try:
err_data = json.loads(err_data.replace("'", '"'))
err_data = json.loads(str(err_data or "").replace("'", '"'))
except Exception:
return VirtualMachineError(base_err=exception, **kwargs)

Expand Down

0 comments on commit 6271dc5

Please sign in to comment.