Skip to content

indentation format should be configurable (or default to 4 spaces) #93

Open

Description

@paulie4

If I'm reading this code correctly, it looks like a tab (\t) is hard-coded as the additional indentation format, even though PEP 8 says, "Spaces are the preferred indentation method." Can this be made configurable or maybe default to 4 spaces instead of a tab character, since this causes errors if the next line of code at the same level uses spaces instead of tabs?

Activity

  1. grisha commented on Aug 24, 2020

    @grisha
    Owner

    Pull requests are welcome!

  2. paulie4 commented on Aug 24, 2020

    @paulie4
    Author

    I'm not familiar at all with this code and just searched for what would be adding the \t indent. Do you have a suggestion for what should be done to make it configurable (although, I'm not sure if/when I'll get a chance to implement the changes)? Thanks!

  3. paulie4 commented on Sep 4, 2020

    @paulie4
    Author

    What we ended up doing was this workaround:

    rawPsp = _psp.parse(...)
    cleanPsp = re.sub(r'^(\s+)', lambda x: x.group(1).replace('\t', '    '), rawPsp, flags=re.MULTILINE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions