Skip to content

Restrict user from changing Options.DT64_DTYPE and Options.DT64_UNIT #861

Closed

Description

@genedan

These can actually be changed via Options.set_value(), not that anyone should, but it can lead to some gnarly bugs. I put these attributes in Options because there weren't any constants at the time that weren't meant to be changed so it looked like a natural place to put them, but when writing the unit tests it became clear to me that these two values aren't "Options" in the optional sense.

I think these shouldn't be changed, so it would make more sense to move these to a new class called Constants.

Since this is Python, a user could change them anyway, but changing how the code is organized will make it more clear to future maintainers that they were meant to be calculated automatically and then remain as-is.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Scope

    None yet

    Effort

    None yet

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions