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

fix: long, ValueError message when list KeyError [APE-1517] #35

Merged
merged 4 commits into from
Nov 8, 2023

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Nov 6, 2023

What I did

fixes: #18

How I did it

mostly just upgrade py-tokenlists, there was had to use the tokenlist name in he error message instead of the repr.

How to verify it

tokens["asdfasfas"]

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@vany365 vany365 changed the title fix: long, ValueError message when list KeyError fix: long, ValueError message when list KeyError [APE-1517] Nov 6, 2023
@@ -4,8 +4,8 @@
from eth_utils import to_checksum_address
from tokenlists import TokenListManager

ERC20 = ContractType(
**{
ERC20 = ContractType.parse_obj(
Copy link
Member Author

Choose a reason for hiding this comment

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

note: did parse_obj to resolve a novel mypy complaint

@@ -65,7 +65,7 @@
python_requires=">=3.8,<4",
install_requires=[
"eth-ape>=0.6.0,<0.7",
"tokenlists>=0.1.3",
"tokenlists>=0.1.5",
Copy link
Member Author

Choose a reason for hiding this comment

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

bugfix part is just this

@antazoey antazoey merged commit cda4c22 into ApeWorX:main Nov 8, 2023
11 checks passed
@antazoey antazoey deleted the fix/repr branch November 8, 2023 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Big long incompreshensible message if no token found
2 participants