Skip to content

Commit

Permalink
fix: weird repr of token manager (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Jul 28, 2023
1 parent cfb6f98 commit fd8e00e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v4.4.0
hooks:
- id: check-yaml

Expand All @@ -10,7 +10,7 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black
name: black
Expand All @@ -21,13 +21,13 @@ repos:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.4.1
hooks:
- id: mypy
additional_dependencies: [types-setuptools, pydantic]

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
rev: 0.7.16
hooks:
- id: mdformat
additional_dependencies: [mdformat-gfm, mdformat-frontmatter]
Expand Down
7 changes: 2 additions & 5 deletions ape_tokens/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,8 @@ class TokenManager(ManagerAccessMixin, dict):
def _manager(self) -> TokenListManager:
return TokenListManager()

@cached_property
def _Contract(self):
from ape import Contract

return Contract
def __repr__(self) -> str:
return "<ape_tokens.TokenManager>"

def __getitem__(self, symbol: str) -> ContractInstance:
try:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"hypothesis>=6.2.0,<7.0", # Strategy-based fuzzer
],
"lint": [
"black>=23.3.0,<24", # auto-formatter and linter
"mypy>=0.991,<1", # Static type analyzer
"black>=23.7.0,<24", # auto-formatter and linter
"mypy>=0.991", # Static type analyzer
"types-setuptools", # Needed due to mypy typeshed
"flake8>=6.0.0,<7", # Style linter
"isort>=5.10.1,<6", # Import sorting linter
Expand Down

0 comments on commit fd8e00e

Please sign in to comment.