Skip to content

Commit

Permalink
chore: clean up perf improvements (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwise-constructs authored Dec 5, 2024
1 parent 0e21544 commit ac6a359
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: [flake8-breakpoint, flake8-print, flake8-pydantic]
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 @@ -28,7 +28,7 @@ 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, mdformat-pyproject]
Expand Down
29 changes: 27 additions & 2 deletions ape_foundry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,37 @@ def providers():


def __getattr__(name: str):
import ape_foundry.provider as module
if name == "FoundryForkProvider":
from ape_foundry.provider import FoundryForkProvider

return getattr(module, name)
return FoundryForkProvider

elif name == "FoundryNetworkConfig":
from ape_foundry.provider import FoundryNetworkConfig

return FoundryNetworkConfig

elif name == "FoundryProvider":
from ape_foundry.provider import FoundryProvider

return FoundryProvider

elif name == "FoundryProviderError":
from ape_foundry.provider import FoundryProviderError

return FoundryProviderError

elif name == "FoundrySubprocessError":
from ape_foundry.provider import FoundrySubprocessError

return FoundrySubprocessError

else:
raise AttributeError(name)


__all__ = [
"FoundryForkProvider",
"FoundryNetworkConfig",
"FoundryProvider",
"FoundryProviderError",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=51.1.1", "wheel", "setuptools_scm[toml]>=5.0"]
requires = ["setuptools>=70.2.0", "wheel", "setuptools_scm[toml]>=5.0"]

[tool.mypy]
exclude = "build/"
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
"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": [
"sphinx-ape",
Expand Down

0 comments on commit ac6a359

Please sign in to comment.