Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruff_python_formatter: move docstring handling to a submodule #8861

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

BurntSushi
Copy link
Member

This turns string into a parent module with a docstring sub-module. I arranged things this way because there are parts of the string module that the docstring module wants to know about (such as a NormalizedString). The alternative I think would be to make docstring a sibling module and expose more of string's internals.

I think I overall like this change because it gives docstring handling a bit more room to breath. It has grown quite a bit with the addition of code snippet formatting.

This was suggested by @charliermarsh.

This will let us add sub-modules. In particular, the docstring handling
is getting big enough to be worth splitting into its own module for room
to breath.
Copy link
Contributor

ruff-ecosystem results

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for following up!

@charliermarsh charliermarsh added the internal An internal refactor or improvement label Nov 27, 2023
@BurntSushi BurntSushi merged commit 33caa2a into main Nov 27, 2023
17 checks passed
@BurntSushi BurntSushi deleted the ag/fmt/move-docstring branch November 27, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants