diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3b49eb00ae..bd031b7f26 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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 @@ -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: [ @@ -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] diff --git a/setup.py b/setup.py index f064c4f0b2..14346443bf 100644 --- a/setup.py +++ b/setup.py @@ -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 @@ -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 diff --git a/src/ape/utils/trace.py b/src/ape/utils/trace.py index 117d51d196..a896c3664e 100644 --- a/src/ape/utils/trace.py +++ b/src/ape/utils/trace.py @@ -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: diff --git a/src/ape_ethereum/provider.py b/src/ape_ethereum/provider.py index 89aee224f8..2f5f2af284 100644 --- a/src/ape_ethereum/provider.py +++ b/src/ape_ethereum/provider.py @@ -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 = ( @@ -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)