Ad
  • Custom User Avatar

    The progress can't go any higher than 100.

    e.g.: if progress is 70 and user gains 50 new points, total would be 120. 100 are removed to increase rank and user ends up with 20 points.

  • Custom User Avatar

    As you can see - typehint for _field_no_pipe: str = None was not applied for help docstring

    Thank you for your feedback! I may be over looking what you're trying to explain. On line 533 of your example, str = None is applied to _field_no_pipe in the help doctstring when you use the rich.inspect(, help=True) method on the ui object, no?

    So, are you referring to the print out on line 535 of your example: '_field_no_pipe', <class 'str'>? This is where you feel it should display str | None instead, so future developers will know this field type can be None as well, correct? However, this is the obj type and not the help doctstring of the obj, correct? Again, thank you for feedback!

  • Custom User Avatar

    Thanks for the feedback. According to the Python docs, it uses this | None = None typehint only for Init-only variables. Please let me know your feedback if you agree or disagree ~ thanks!