| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Fix bug regarding multiline docstrings | Jon Banafato | 2021-03-22 | 1 | -0/+35 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a multiline docstring has its closing quotes at the end of a line instead of on a separate line, isort fails to properly add imports using the `add_imports` config option; instead, it adds the desired imports into the middle of the docstring as illustrated below. While PEP 257 (and other guides) advises that closing quotes appear on their own line, `isort` should not fail here. This change adds a check for closing docstrings at the end of a line in addition to the existing line start check for all comment indicators. A new section of the `test_add_imports` test explicitly tests multiline imports and this failure scenario specifically. --- A working example: ```python """My module. Provides example functionality. """ print("hello, world") ``` Running `isort --add-import "from __future__ import annotations"` produces the following as expected: ```python """My module. Provides example functionality. """ from __future__ import annotations print("hello, world") ``` --- The failure behavior described: ```python """My module. Provides example functionality.""" print("hello, world") ``` Running `isort --add-import "from __future__ import annotations"` as above produces the following result: ```python """My module. from __future__ import annotations Provides example functionality.""" print("hello, world") ``` Subsequent executions add more import lines into the docstring. This behavior occurs even if the file already has the desired imports. | ||||
| * | Fix test to ensure output is the same | Timothy Crosley | 2021-03-20 | 1 | -4/+4 |
| | | |||||
| * | Create failing test for issue #1566 | Timothy Crosley | 2021-03-19 | 1 | -0/+12 |
| | | |||||
| * | Fixed #1594: incorrect placement of noqa comments with multiple from imports. | Timothy Crosley | 2021-03-18 | 1 | -0/+22 |
| | | |||||
| * | Resolved #1504: Added ability to push star imports to the top to avoid ↵ | Timothy Crosley | 2021-03-17 | 1 | -0/+23 |
| | | | | | overriding explicitly defined imports. | ||||
| * | Add test case for issue #1645: Allowing sort order to be reversed | Timothy Crosley | 2021-03-17 | 1 | -0/+30 |
| | | |||||
| * | Add test case to ensure incorrectly formatted from statements dont disapear | Timothy Crosley | 2021-03-15 | 1 | -0/+21 |
| | | |||||
| * | Resolve #1684: Add support for --extend-skip and --extend-skip-glob | Timothy Crosley | 2021-03-13 | 1 | -1/+1 |
| | | |||||
| * | Merge branch 'develop' into issue/1659/force-sort-sections-with-relative-imports | Timothy Edmund Crosley | 2021-03-10 | 5 | -1/+122 |
| |\ | |||||
| | * | Implemented #1638 / #1644: Provide a flag to ensure same file handle is ↵ | Timothy Crosley | 2021-03-04 | 2 | -0/+6 |
| | | | | | | | | | used after sorting. | ||||
| | * | Fix indentation | Timothy Crosley | 2021-03-03 | 1 | -1/+1 |
| | | | |||||
| | * | Create failing test for issue #1667issue/1667 | Timothy Crosley | 2021-03-02 | 1 | -0/+17 |
| | | | |||||
| | * | Add test for allowing root, switch to allow root command | Timothy Crosley | 2021-03-01 | 1 | -0/+5 |
| | | | |||||
| | * | fix :Failed to pull configuration information from pyproject.toml | dongfangtianyu | 2021-02-24 | 1 | -0/+25 |
| | | | |||||
| | * | Add test case for issue #1670 | Timothy Crosley | 2021-02-17 | 1 | -0/+31 |
| | | | |||||
| | * | Fix not replacing the source file if only literals are changed but not the ↵ | Marco Lam | 2021-02-17 | 1 | -1/+38 |
| | | | | | | | | | imports | ||||
| * | | squash! Add new option for sorting relative imports in force-sorted sections | gofr | 2021-02-14 | 1 | -4/+4 |
| | | | | | | | | | Restore unrelated test to original | ||||
| * | | Add new option for sorting relative imports in force-sorted sections | gofr | 2021-02-14 | 1 | -2/+37 |
| | | | | | | | | | | | | | | | | | Add --sort-relative-in-force-sorted-sections to make sorting of --force-sort-within-sections consistent with the way imports are sorted without force-sorted sections. Add tests for both the old and new behaviors. | ||||
| * | | Sort relative imports correctly with force_sort_within_sections | gofr | 2021-02-11 | 2 | -4/+37 |
| |/ | | | | | | | | Relative import sort order when using force_sort_within_sections was inconsistent with the order without that setting. Change the force_sort_within_sections sort order to match. This fixes the relative import ordering issues noted in #1659. | ||||
| * | Make last snippet valid code | Timothy Crosley | 2021-02-09 | 1 | -1/+1 |
| | | |||||
| * | Fix formatting | Timothy Crosley | 2021-02-09 | 1 | -6/+13 |
| | | |||||
| * | Add wemake profile | Timothy Crosley | 2021-02-09 | 1 | -0/+80 |
| | | |||||
| * | Made identified imports .statement() runnable codeissue/1641 | Timothy Crosley | 2021-02-07 | 1 | -4/+4 |
| | | |||||
| * | Respect line_length in vertical grid modes and deprecate mode 6 | gofr | 2021-02-05 | 3 | -61/+17 |
| | | | | | | | | | | | | | | | | | | | | In the three vertical grid multi line modes (4, 5 and 6), each mode had a bug where the line length would be overcounted or undercounted by one character when used in combination with an unexpected value for the include_trailing_comma setting. This could cause import lines to exceed the line_length or be wrapped at one less than the specified line_length. Count the trailing characters correctly. This also deprecates mode 6, since the only difference between this mode and mode 5 is in how it handles include_trailing_comma. The distinction is no longer relevant, since mode 5 can now handle both possible values of include_trailing_comma. For backwards compatibility, make mode 6 an alias for mode 5. | ||||
| * | Unit test behavior of vertical grids close to the line length | gofr | 2021-02-05 | 1 | -0/+46 |
| | | | | | | | | The three vertical grid multi line output modes 4, 5 and 6 use a shared function that makes them all wrap slightly differently when the import lines are right around the line length limit. Add tests to document the behavior and catch regressions. | ||||
| * | Fix broken integration test | Timothy Crosley | 2021-02-03 | 1 | -1/+3 |
| | | |||||
| * | Fix integration test | Timothy Crosley | 2021-01-12 | 1 | -1/+13 |
| | | |||||
| * | Add test for duplicate alias case | Timothy Crosley | 2021-01-12 | 1 | -0/+12 |
| | | |||||
| * | Update test to use correct spacing for comments | Timothy Crosley | 2021-01-12 | 1 | -2/+2 |
| | | |||||
| * | Add test case for issue #1631issue/1631 | Timothy Crosley | 2021-01-10 | 1 | -0/+10 |
| | | |||||
| * | Merge pull request #1626 from gofr/issue/1624 | Timothy Edmund Crosley | 2021-01-01 | 1 | -0/+88 |
| |\ | | | | | Make force_sort_within_sections respect case | ||||
| | * | Move fix behind a flag | gofr | 2020-12-31 | 1 | -1/+61 |
| | | | |||||
| | * | Make force_sort_within_sections respect case | gofr | 2020-12-30 | 1 | -1/+29 |
| | | | | | | | | | | | | | | | | | | | | | | | force_sort_within_sections only looked at the order_by_type option to determine how to order imports with different case in a section. Whether you order import names by type or not also affected the order of the modules. When force_sort_within_sections is used: * ignore case on the module name if case_sensitive is false, * ignore case on the imported names if order_by_type is false. | ||||
| * | | 100% test coverage | Timothy Crosley | 2020-12-30 | 2 | -1/+28 |
| | | | |||||
| * | | 100% test coverage for new identify module | Timothy Crosley | 2020-12-30 | 1 | -1/+27 |
| | | | |||||
| * | | Fix indented identification isort | Timothy Crosley | 2020-12-30 | 3 | -7/+54 |
| | | | |||||
| * | | Add additional identification test cases | Timothy Crosley | 2020-12-30 | 1 | -2/+63 |
| | | | |||||
| * | | Add initial unit testing for identify - with focuses on yield and raise edge ↵ | Timothy Crosley | 2020-12-30 | 1 | -0/+139 |
| |/ | | | | cases currently handled by import sorting core | ||||
| * | Update tests to enforce import identifaction line numbers use 1 base indexing | Timothy Crosley | 2020-12-29 | 2 | -15/+15 |
| | | |||||
| * | Add testing for unique | Timothy Crosley | 2020-12-28 | 1 | -5/+16 |
| | | |||||
| * | Fix test line lengths | Timothy Crosley | 2020-12-25 | 1 | -7/+13 |
| | | |||||
| * | Remove uneeded line | Timothy Crosley | 2020-12-24 | 1 | -1/+0 |
| | | |||||
| * | Expand test to capture case where comma is already present | Timothy Crosley | 2020-12-24 | 1 | -0/+9 |
| | | |||||
| * | Add failing test for issue #1621: Showing that double comma does indeed apear. | Timothy Crosley | 2020-12-24 | 1 | -0/+16 |
| | | |||||
| * | identify imports directory support | Timothy Crosley | 2020-12-21 | 1 | -2/+1 |
| | | |||||
| * | Add test for new files modulefeature/super-fast-import-identification | Timothy Crosley | 2020-12-20 | 1 | -0/+8 |
| | | |||||
| * | All tests now passingd | Timothy Crosley | 2020-12-20 | 3 | -48/+34 |
| | | |||||
| * | linting | Timothy Crosley | 2020-12-13 | 1 | -1/+1 |
| | | |||||
| * | Fix datadog integration test | Timothy Crosley | 2020-12-12 | 1 | -1/+1 |
| | | |||||
| * | Add test for #1604: allow toggling section header in indented imports | Timothy Crosley | 2020-12-09 | 1 | -0/+48 |
| | | |||||
