Skip to content

Commit

Permalink
fix: run black
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro-Morales committed Feb 5, 2024
1 parent 5961b6b commit bdb26ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/src/uagents/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ def get_agent_address(name: str, test: bool) -> str:
addresses = [val.get("address") for val in registered_records]
weights = [val.get("weight") for val in registered_records]
selected_address_list = weighted_random_sample(addresses, weights=weights)
selected_address = selected_address_list[0] if selected_address_list else None
selected_address = (
selected_address_list[0] if selected_address_list else None
)
print(selected_address)
return selected_address
return None
Expand Down

0 comments on commit bdb26ed

Please sign in to comment.