Skip to content

Commit ac6a359

Browse files
chore: clean up perf improvements (#117)
1 parent 0e21544 commit ac6a359

File tree

4 files changed

+33
-7
lines changed

4 files changed

+33
-7
lines changed

.pre-commit-config.yaml

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

2424
- repo: https://github.com/pre-commit/mirrors-mypy
2525
rev: v1.13.0
@@ -28,7 +28,7 @@ repos:
2828
additional_dependencies: [types-PyYAML, types-requests, types-setuptools, pydantic]
2929

3030
- repo: https://github.com/executablebooks/mdformat
31-
rev: 0.7.18
31+
rev: 0.7.19
3232
hooks:
3333
- id: mdformat
3434
additional_dependencies: [mdformat-gfm, mdformat-frontmatter, mdformat-pyproject]

ape_foundry/__init__.py

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,37 @@ def providers():
5959

6060

6161
def __getattr__(name: str):
62-
import ape_foundry.provider as module
62+
if name == "FoundryForkProvider":
63+
from ape_foundry.provider import FoundryForkProvider
6364

64-
return getattr(module, name)
65+
return FoundryForkProvider
66+
67+
elif name == "FoundryNetworkConfig":
68+
from ape_foundry.provider import FoundryNetworkConfig
69+
70+
return FoundryNetworkConfig
71+
72+
elif name == "FoundryProvider":
73+
from ape_foundry.provider import FoundryProvider
74+
75+
return FoundryProvider
76+
77+
elif name == "FoundryProviderError":
78+
from ape_foundry.provider import FoundryProviderError
79+
80+
return FoundryProviderError
81+
82+
elif name == "FoundrySubprocessError":
83+
from ape_foundry.provider import FoundrySubprocessError
84+
85+
return FoundrySubprocessError
86+
87+
else:
88+
raise AttributeError(name)
6589

6690

6791
__all__ = [
92+
"FoundryForkProvider",
6893
"FoundryNetworkConfig",
6994
"FoundryProvider",
7095
"FoundryProviderError",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=51.1.1", "wheel", "setuptools_scm[toml]>=5.0"]
2+
requires = ["setuptools>=70.2.0", "wheel", "setuptools_scm[toml]>=5.0"]
33

44
[tool.mypy]
55
exclude = "build/"

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
"flake8-breakpoint>=1.1.0,<2", # Detect breakpoints left in code
2525
"flake8-print>=5.0.0,<6", # Detect print statements left in code
2626
"flake8-pydantic", # For detecting issues with Pydantic models
27+
"flake8-type-checking", # Detect imports to move in/out of type-checking blocks
2728
"isort>=5.13.2,<6", # Import sorting linter
28-
"mdformat>=0.7.18", # Auto-formatter for markdown
29+
"mdformat>=0.7.19", # Auto-formatter for markdown
2930
"mdformat-gfm>=0.3.5", # Needed for formatting GitHub-flavored markdown
3031
"mdformat-frontmatter>=0.4.1", # Needed for frontmatters-style headers in issue templates
31-
"mdformat-pyproject>=0.0.1", # Allows configuring in pyproject.toml
32+
"mdformat-pyproject>=0.0.2", # Allows configuring in pyproject.toml
3233
],
3334
"doc": [
3435
"sphinx-ape",

0 commit comments

Comments
 (0)