Skip to content

Commit

Permalink
chore: lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Dare committed May 19, 2024
1 parent ea61c25 commit e2a1515
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bittensor/subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,9 @@ def set_take(
This function is a key part of the decentralized governance mechanism of Bittensor, allowing for the
dynamic selection and participation of validators in the network's consensus process.
"""
# Ensure delegate_ss58 is not None
if delegate_ss58 is None:
raise ValueError("delegate_ss58 cannot be None")

# Caulate u16 representation of the take
takeu16 = int(take * 0xFFFF)
Expand All @@ -602,7 +605,7 @@ def set_take(

if takeu16 == current_take:
bittensor.__console__.print("Nothing to do, take hasn't changed")
return
return True
if current_take is None or current_take < takeu16:
bittensor.__console__.print(
"Current take is either not set or is lower than the new one. Will use increase_take"
Expand Down

0 comments on commit e2a1515

Please sign in to comment.