Skip to content

DelayParameter name convention is causing warning #1095

Description

@TrevorJA

Minor issue with (presumably) minor fix.

The DelayNode in pywr.nodes is assigning the FlowDelayParameter the name param_name = "{} - delay parameter".format(name) which is causing the following:

NaturalNameWarning: object name is not a valid Python identifier: 'delay_<name> - delay parameter'; it does not match the pattern ``^[a-zA-Z_][a-zA-Z0-9_]*$``; you will not be able to use natural naming to access this object; using ``getattr()`` will still work, though

It has been running perfectly fine, though. Cheers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions