Zac-HD / shed

`shed` canonicalises Python code. Shed your legacy, stop bikeshedding, and move on. Black++

Home Page:https://pypi.org/project/shed/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bugs in `shed --refactor`

Zac-HD opened this issue · comments

Crash on refactor

These snippets are turned into invalid code by `--refactor

assert (
    "some very long                       string"
    and "another long                     string"
    == "third long                        string"
)

if isinstance(x, int) or isinstance(x, float):
    pass

Incorrect output

Incorrectly replaced with {}, because there's a single argument where the value is an empty collection literal; this should account for the presence of a keyword. (the logic is correct for list, tuple, and positional args to dict)

dict(ENV_VAR="")