traitlets icon indicating copy to clipboard operation
traitlets copied to clipboard

generate_config_file: Writing empty sets

Open jhermann opened this issue 6 years ago • 2 comments

IMHO; empty sets should be written as set([]) (not set()), since when you later add some values, it is easy to forget adding the []. Yes, you can also use set literals, but then the existing set() does not nudge you into that direction.

jhermann avatar Mar 23 '19 09:03 jhermann

@jhermann I'm not sure it's worth changing this, it seems like a lot of work to improve line diffing on a code-base that is slow to change, and which has few (if any) uses of set in the first place.

rmorshea avatar Apr 04 '19 00:04 rmorshea

Woops it wasn't clear what this was referring to. You're free to open up a PR for this if you want.

rmorshea avatar Apr 04 '19 01:04 rmorshea