Skip to content

Commit

Permalink
chore: adds back in __all__ to library and adds flake8 and mdformat d…
Browse files Browse the repository at this point in the history
…eps (#91)
  • Loading branch information
bitwise-constructs authored Nov 25, 2024
1 parent 8e136ae commit a39aa3b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ 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
Expand All @@ -27,10 +28,10 @@ repos:
additional_dependencies: [types-PyYAML, types-requests, 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]
additional_dependencies: [mdformat-gfm, mdformat-frontmatter, mdformat-pyproject]

default_language_version:
python: python3
16 changes: 13 additions & 3 deletions ape_infura/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@ def providers():


def __getattr__(name: str):
if name == "NETWORKS":
if name == "Infura":
from ape_infura.provider import Infura

return Infura

elif name == "NETWORKS":
from ape_infura.utils import NETWORKS

return NETWORKS

import ape_infura.provider as module
else:
raise AttributeError(name)


return getattr(module, name)
__all__ = [
"Infura",
"NETWORKS",
]
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
"flake8>=7.1.1,<8", # Style linter
"flake8-breakpoint>=1.1.0,<2", # Detect breakpoints left in code
"flake8-print>=5.0.0,<6", # Detect print statements left in code
"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": [
"myst-parser>=1.0.0,<2", # Parse markdown docs
Expand Down

0 comments on commit a39aa3b

Please sign in to comment.