Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S Swift Ring Management
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Custom issue tracker
    • Custom issue tracker
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • repos
  • data_persistence
  • Swift Ring Management
  • Merge requests
  • !1

Use a named tuple class for (weight,immediate); no functional change

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged MVernon requested to merge namedtuples into main Jan 05, 2022
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 1

Make the WeightChange class, which is a collections.namedtuple. This lets us access the weight and immediate members by name, making the code clearer.

It also reduces some confusion in the previous code where (immediate[,weight]) was used for overrides and (weight,immediate) was used for desired weight changes (i.e. after applying those overrides).

This change has been tested against the test suite on both python2 and python3.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: namedtuples