Skip to content

Move tools, introduce helper to check if an output is available

Moul requested to merge tools_helper_output_available into dev
  • Move helpers.py to tools.py to avoid confusion with the introduction of helpers
  • Introduce helpers folder for helpers used by clients developers
  • Add helper to check if an output is available according to one unlock condition
    • with tests

  • Are you ok with the naming tools.py?
  • MyPy is not happy on the condition.left because it is defined as an empty string in the __init__(). I do not know how to overcome this.
duniterpy/helpers/money.py:18: error: "str" has no attribute "pubkey"
duniterpy/helpers/money.py:20: error: "str" has no attribute "time"
duniterpy/helpers/money.py:22: error: "str" has no attribute "timestamp"
duniterpy/helpers/money.py:24: error: "str" has no attribute "sha_hash"

Looks similar to https://github.com/python/mypy/issues/5719.

Edited by Moul

Merge request reports