Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

asort breaks docstring indention #8

Closed
kdeldycke opened this issue Apr 16, 2023 · 1 comment · Fixed by #10
Closed

asort breaks docstring indention #8

kdeldycke opened this issue Apr 16, 2023 · 1 comment · Fixed by #10

Comments

@kdeldycke
Copy link

Given the following minimal python code:

$ cat ./asort_indention.py
class Group:

    platform_ids: frozenset[str] = field(default_factory=frozenset)
    """Set of platform IDs that belong to this group.

    Used to test platform overlaps between groups.
    """

Passing that code above to asort is introducing bad docstring indention:

$ poetry run python -m pip install asort
Collecting asort
  Downloading asort-0.1.3-py3-none-any.whl (9.8 kB)
Installing collected packages: asort
Successfully installed asort-0.1.3

$ poetry run asort ./asort_indention.py

$ cat ./asort_indention.py
class Group:

    platform_ids: frozenset[str] = field(default_factory=frozenset)
"""Set of platform IDs that belong to this group.

    Used to test platform overlaps between groups.
    """
@kdeldycke
Copy link
Author

I can confirm #10 is fixing the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant