this results in the fieldset fields being a str rather than a tuple (a single item tuple requires a comma otherwise python willn not know it's a tuple. It's a comma that makes the tuple, not paren).
Funnily enough - the reason the tests pass is the field name is a single character "c", so when Django loops over the string, it finds one item: "c".If the field name had two chars then the bug would present itself.
Expected Behavior
fieldset fields should be a tuple like so
("Fieldset 3", {"fields": ("c",)}),
Steps To Reproduce
NA
Environment
NA
Anything else?
I am a static analysis tool, and found this issue while integration testing new checks against various codebases - this one included.
Is there an existing issue for this?
Current Behavior
Missing comma from fieldset "fields" value on line 471:
https://github.com/stephenmcd/mezzanine/blob/b407cb70ff66684e0511b827234e103259a91d4c/tests/test_core.py#L468-L472
this results in the fieldset fields being a
str
rather than a tuple (a single item tuple requires a comma otherwise python willn not know it's a tuple. It's a comma that makes the tuple, not paren).Funnily enough - the reason the tests pass is the field name is a single character "c", so when Django loops over the string, it finds one item: "c".If the field name had two chars then the bug would present itself.
Expected Behavior
fieldset
fields
should be a tuple like soSteps To Reproduce
NA
Environment
Anything else?
I am a static analysis tool, and found this issue while integration testing new checks against various codebases - this one included.