Skip to content

Commit

Permalink
Fix issue #1494: pxd files should be sorted by default
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed Sep 24, 2020
1 parent 958fed9 commit 2c51557
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,7 @@ Find out more about isort's release policy [here](https://pycqa.github.io/isort/

### 5.6.0 TBD
- Implemented #1433: Provide helpful feedback in case a custom config file is specified without a configuration.
- Implemented #1494: Default to sorting imports within `.pxd` files.
- Improved handling of unsupported configuration option errors (see #1475).
- Fixed #1463: Better interactive documentation for future option.
- Fixed #1461: Quiet config option not respected by file API in some circumstances.
Expand Down
2 changes: 1 addition & 1 deletion isort/settings.py
Expand Up @@ -31,7 +31,7 @@
from .wrap_modes import from_string as wrap_mode_from_string

_SHEBANG_RE = re.compile(br"^#!.*\bpython[23w]?\b")
SUPPORTED_EXTENSIONS = frozenset({"py", "pyi", "pyx"})
SUPPORTED_EXTENSIONS = frozenset({"py", "pyi", "pyx", "pxd"})
BLOCKED_EXTENSIONS = frozenset({"pex"})
FILE_SKIP_COMMENTS: Tuple[str, ...] = (
"isort:" + "skip_file",
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_settings.py
Expand Up @@ -49,6 +49,7 @@ def test_is_supported_filetype(self):
assert self.instance.is_supported_filetype("file.py")
assert self.instance.is_supported_filetype("file.pyi")
assert self.instance.is_supported_filetype("file.pyx")
assert self.instance.is_supported_filetype("file.pxd")
assert not self.instance.is_supported_filetype("file.pyc")
assert not self.instance.is_supported_filetype("file.txt")
assert not self.instance.is_supported_filetype("file.pex")
Expand Down

0 comments on commit 2c51557

Please sign in to comment.