Skip to content

refactor: remove unused U32_MAX constant - #953

Closed
ebios-star wants to merge 1 commit into
entrius:testfrom
ebios-star:refactor/remove-unused-u32-max-constant
Closed

refactor: remove unused U32_MAX constant#953
ebios-star wants to merge 1 commit into
entrius:testfrom
ebios-star:refactor/remove-unused-u32-max-constant

Conversation

@ebios-star

Copy link
Copy Markdown
Contributor

Summary

U32_MAX = 4294967295 is defined at the top of neurons/base/utils/weight_utils.py but has zero references anywhere in the codebase. The sibling U16_MAX constant is actively used by convert_weights_and_uids_for_emit and process_weights_for_netuid.

Verified via:

  • grep -rn U32_MAX — only the definition line.
  • grep -rn 4294967295 — only the definition line.

Net: -1 line.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Testing

  • pytest tests/ — all 726 tests pass.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

U32_MAX is defined in neurons/base/utils/weight_utils.py but has zero
references across gittensor/, neurons/, and tests/. The sibling U16_MAX
is actively used by convert_weights_and_uids_for_emit and
process_weights_for_netuid.

Verified via 'grep -rn U32_MAX' and 'grep -rn 4294967295' — both return
only the definition line.
@ebios-star

Copy link
Copy Markdown
Contributor Author

@anderdc whenever you have a moment, this is a one-line removal of an unused constant. Happy to revise if you'd prefer a different scope. Thanks!

@xiao-xiao-mao xiao-xiao-mao Bot added the refactor Code restructuring without behavior change label May 3, 2026
@anderdc anderdc mentioned this pull request May 5, 2026
8 tasks
@anderdc

anderdc commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Closing — please consolidate into #917.

@anderdc anderdc closed this May 5, 2026
@ebios-star

Copy link
Copy Markdown
Contributor Author

Consolidated into #955 per @anderdc's request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code restructuring without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants