Skip to content

Commit

Permalink
chore: fix small lint and performance mistakes (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Nov 25, 2024
1 parent 7f79752 commit d898181
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 1 addition & 3 deletions ape_solidity/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import Any

from ape import plugins


Expand All @@ -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

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d898181

Please sign in to comment.