Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: clean up perf improvements #117

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does scm tools need the upper bound you added on arbitrum pr? Im not sure why thatd mattet tbd but just noticed the diff


[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
Loading