From 5bce2133a1ffb9cdd55eaa04774eabf246ee13b5 Mon Sep 17 00:00:00 2001 From: antazoey Date: Mon, 25 Nov 2024 23:59:04 +0700 Subject: [PATCH] chore: realizations from performance and lint upgrades (#137) --- .pre-commit-config.yaml | 2 +- README.md | 2 +- ape_vyper/__init__.py | 4 +--- ape_vyper/compiler/api.py | 2 +- setup.py | 4 ++-- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 53a019a..25f459b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,7 +28,7 @@ repos: additional_dependencies: [types-setuptools, pydantic] - repo: https://github.com/executablebooks/mdformat - rev: 0.7.18 + rev: 0.7.19 hooks: - id: mdformat additional_dependencies: [mdformat-gfm, mdformat-frontmatter, mdformat-pyproject] diff --git a/README.md b/README.md index d3833d0..becacf5 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ You can do so with a command like this: ape vyper flatten contracts/MyContract.vy build/MyContractFlattened.vy ``` -> \[!WARNING\] +> [!WARNING] > This feature is experimental. Please [report any bugs](https://github.com/ApeWorX/ape-solidity/issues/new?assignees=&labels=bug&projects=&template=bug.md) you find when trying it out. ### Compiler Version diff --git a/ape_vyper/__init__.py b/ape_vyper/__init__.py index 290656b..092f9c8 100644 --- a/ape_vyper/__init__.py +++ b/ape_vyper/__init__.py @@ -1,5 +1,3 @@ -from typing import Any - from ape import plugins @@ -18,7 +16,7 @@ def register_compiler(): return tuple(e.value for e in FileType), VyperCompiler -def __getattr__(name: str) -> Any: +def __getattr__(name: str): if name == "FileType": from ._utils import FileType diff --git a/ape_vyper/compiler/api.py b/ape_vyper/compiler/api.py index 40e2c7b..82bb0ea 100644 --- a/ape_vyper/compiler/api.py +++ b/ape_vyper/compiler/api.py @@ -251,7 +251,7 @@ def compile( ) -> Iterator["ContractType"]: pm = project or self.local_project original_settings = self.compiler_settings - self.compiler_settings = {**self.compiler_settings, **(settings or {})} + self.compiler_settings: dict = {**self.compiler_settings, **(settings or {})} try: yield from self._compile(contract_filepaths, project=pm) finally: diff --git a/setup.py b/setup.py index 1599fe7..7289746 100644 --- a/setup.py +++ b/setup.py @@ -18,10 +18,10 @@ "flake8-pydantic", # For detecting issues with Pydantic models "flake8-type-checking", # Detect imports to move in/out of type-checking blocks "isort>=5.13.2", # Import sorting linter - "mdformat>=0.7.18", # Auto-formatter for markdown + "mdformat>=0.7.19", # 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 + "mdformat-pyproject>=0.0.2", # Allows configuring in pyproject.toml ], "release": [ # `release` GitHub Action job uses this "setuptools", # Installation tool