From d898181d1009d2b3227f3817b8831dcb9e8254e8 Mon Sep 17 00:00:00 2001 From: antazoey Date: Mon, 25 Nov 2024 20:48:45 +0700 Subject: [PATCH] chore: fix small lint and performance mistakes (#156) --- .pre-commit-config.yaml | 5 +++-- ape_solidity/__init__.py | 4 +--- setup.py | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5a3bcd6..ba43032 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,15 +19,16 @@ repos: rev: 7.1.1 hooks: - id: flake8 + additional_dependencies: [flake8-breakpoint, flake8-print, flake8-pydantic, flake8-type-checking] - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.13.0 hooks: - id: mypy - additional_dependencies: [types-requests, types-setuptools, flake8-pydantic, flake8-type-checking] + additional_dependencies: [types-requests, types-setuptools] - 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/ape_solidity/__init__.py b/ape_solidity/__init__.py index 97e4d82..cdca499 100644 --- a/ape_solidity/__init__.py +++ b/ape_solidity/__init__.py @@ -1,5 +1,3 @@ -from typing import Any - from ape import plugins @@ -18,7 +16,7 @@ def register_compiler(): return (Extension.SOL.value,), SolidityCompiler -def __getattr__(name: str) -> Any: +def __getattr__(name: str): if name == "Extension": from ._utils import Extension diff --git a/setup.py b/setup.py index 67e78ac..d4e5f26 100644 --- a/setup.py +++ b/setup.py @@ -20,15 +20,15 @@ "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,<6", # 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 ], "doc": [ "Sphinx>=6.1.3,<7", # Documentation generator "sphinx_rtd_theme>=1.2.0,<2", # Readthedocs.org theme - "towncrier>=19.2.0, <20", # Generate release notes + "towncrier>=19.2.0,<20", # Generate release notes ], "release": [ # `release` GitHub Action job uses this "setuptools", # Installation tool