Skip to content

Commit

Permalink
chore: attr err improve
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Oct 13, 2023
1 parent 8ab5f68 commit 2b8fc8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ape/utils/basemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ def __getattr__(self, name: str) -> Any:

# The error message mentions the alternative mappings,
# such as a contract-type map.
message = f"No attribute with name '{name}'."
message = f"'{repr(self)}' has no attribute '{name}'"
if extras_checked:
extras_str = ", ".join(extras_checked)
message = f"{message} Also checked '{extras_str}'."
message = f"{message}. Also checked '{extras_str}'"

raise ApeAttributeError(message)

Expand Down

0 comments on commit 2b8fc8a

Please sign in to comment.