Issue #10 resolved

Unreachable code in form field clean logic

Alexis Petrounias
created an issue

In module timedelta.forms, class TimedeltaFormField, method clean, the last statement

    return datetime.timedelta(**data)

is unreachable, which consequently means the variable data is never used.

Do you intend to use data as a fallback in case parse fails?

Comments (2)

  1. Matthew Schinckel repo owner

    I'd suggest it was some code that was accidentally left in place: I think I was going to look at an alternative way of parsing, or something like that.

    Both the definition of data, and the line you point out will be removed, as they indeed have no effect.

  2. Log in to comment