Skip to content

Commit c9c119e

Browse files
fix: add back exposed attributes and includes flake8 plugins (#35)
* fix: add back exposed attributes and includes flake8 plugins * chore: mdformat * chore: flake plugins in pre * fix: missing plugin --------- Co-authored-by: Juliya Smith <jules@apeworx.io>
1 parent 4074900 commit c9c119e

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ repos:
1919
rev: 7.1.1
2020
hooks:
2121
- id: flake8
22+
additional_dependencies: [flake8-breakpoint, flake8-print, flake8-pydantic, flake8-type-checking]
2223

2324
- repo: https://github.com/pre-commit/mirrors-mypy
2425
rev: v1.13.0
@@ -27,10 +28,10 @@ repos:
2728
additional_dependencies: [types-setuptools, pydantic]
2829

2930
- repo: https://github.com/executablebooks/mdformat
30-
rev: 0.7.18
31+
rev: 0.7.19
3132
hooks:
3233
- id: mdformat
33-
additional_dependencies: [mdformat-gfm, mdformat-frontmatter]
34+
additional_dependencies: [mdformat-gfm, mdformat-frontmatter, mdformat-pyproject]
3435

3536
default_language_version:
3637
python: python3

ape_polygon/__init__.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,30 @@ def providers():
4646
yield "polygon", network_name, Node
4747

4848
yield "polygon", LOCAL_NETWORK_NAME, LocalProvider
49+
50+
51+
def __getattr__(name: str):
52+
if name == "NETWORKS":
53+
from .ecosystem import NETWORKS
54+
55+
return NETWORKS
56+
57+
elif name == "Polygon":
58+
from .ecosystem import Polygon
59+
60+
return Polygon
61+
62+
elif name == "PolygonConfig":
63+
from .ecosystem import PolygonConfig
64+
65+
return PolygonConfig
66+
67+
else:
68+
raise AttributeError(name)
69+
70+
71+
__all__ = [
72+
"NETWORKS",
73+
"Polygon",
74+
"PolygonConfig",
75+
]

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
"flake8>=7.1.1,<8", # Style linter
1717
"flake8-breakpoint>=1.1.0,<2", # Detect breakpoints left in code
1818
"flake8-print>=5.0.0,<6", # Detect print statements left in code
19+
"flake8-pydantic", # For detecting issues with Pydantic models
20+
"flake8-type-checking", # Detect imports to move in/out of type-checking blocks
1921
"isort>=5.13.2,<6", # Import sorting linter
20-
"mdformat>=0.7.18", # Auto-formatter for markdown
22+
"mdformat>=0.7.19", # Auto-formatter for markdown
2123
"mdformat-gfm>=0.3.5", # Needed for formatting GitHub-flavored markdown
2224
"mdformat-frontmatter>=0.4.1", # Needed for frontmatters-style headers in issue templates
23-
"mdformat-pyproject>=0.0.1", # Allows configuring in pyproject.toml
25+
"mdformat-pyproject>=0.0.2", # Allows configuring in pyproject.toml
2426
],
2527
"release": [ # `release` GitHub Action job uses this
2628
"setuptools", # Installation tool

0 commit comments

Comments
 (0)