circleguard/circlecore

favor span over num in ReplayContainers

Closed this issue · 1 comments

tybug commented

Currently it's very easy to forget to pass one of span or num when creating a ReplayContainer:

m = Map(221777)

since both arguments are marked optional, this is valid code to any python IDE. It will throw an exception during runtime:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/tybug/Desktop/coding/osu/circlecore/circleguard/loadable.py", line 247, in __init__
    raise ValueError("One of num or span must be specified, but not both")
ValueError: One of num or span must be specified, but not both

But that can be annoying to deal with. Since span is the more powerful of the two options, we should make that a required argument, and probably remove num entirely

tybug commented

closing as implemented with linked core 4.0.0 release