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

Cython .pxd files not being picked up #1494

Closed
cjdsellers opened this issue Sep 22, 2020 · 4 comments
Closed

Cython .pxd files not being picked up #1494

cjdsellers opened this issue Sep 22, 2020 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@cjdsellers
Copy link

I may be doing something wrong. However, on running the command isort . isort is not detecting the imports inside .pxd files.

@timothycrosley
Copy link
Member

timothycrosley commented Sep 24, 2020

Currently, isort only automatically picks up .pyx files: https://pycqa.github.io/isort/docs/configuration/options/#supported-extensions. Though I think it makes sense to change this, and will make sure pxd is included by default in the next minor release.

For now, you can also adjust this behaviour, either in your config or by specifying the desired extensions on the command line:

isort . --ext py --ext pyi --ext pyx --ext pxd

Thanks!

~Timothy

@timothycrosley timothycrosley added the enhancement New feature or request label Sep 24, 2020
@timothycrosley timothycrosley added this to the 5.6.0 milestone Sep 24, 2020
@timothycrosley
Copy link
Member

The default has been changed in develop and will be pushed to PyPI in release 5.6.0

@timothycrosley
Copy link
Member

Update: this has just been released to PyPI in 5.6.0 release of isort: https://pycqa.github.io/isort/CHANGELOG/#560-october-7-2020

Thanks!

~Timothy

@cjdsellers
Copy link
Author

Thanks Timothy

Much appreciated!

MarcoGorelli added a commit to MarcoGorelli/isort that referenced this issue Oct 8, 2020
In PyCQA#1494, it looks like support for `.pxd` files was added. However, these are currently ignored when running isort in pre-commit because there is `types: [python]`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants