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

MAINT: Add Import Sorting for Docs and Jupyter Notebooks (isort/nbqa-isort) #646

Merged

Conversation

nina-msft
Copy link
Contributor

Description

When investigating jupytext for another story, I saw that we can sort in notebooks with an added argument --treat-comment-as-code "# %%": PyCQA/isort#1338

That led me to https://github.com/nbQA-dev/nbQA which runs isort on Jupyter notebooks. Adding this with the profile set to black as with isort so we can also use sorting on doc\ .py and .ipynb files without need of manual correction.

Tests and Documentation

Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

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

Nice!

@nina-msft nina-msft merged commit 8603247 into Azure:main Jan 16, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants