summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add - Jon Banafato (@jonafato)developTimothy Crosley2021-03-221-0/+1
| | | | to contributors list
* Add changelog entry for fix from @jonafatoTimothy Crosley2021-03-221-0/+3
|
* Merge pull request #1695 from ↵Timothy Edmund Crosley2021-03-222-1/+38
|\ | | | | | | | | jonafato/fix-multiline-docstring-ending-on-line-add_import Fix bug regarding multiline docstrings
| * Fix bug regarding multiline docstringsJon Banafato2021-03-222-1/+38
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update documentationTimothy Crosley2021-03-201-4/+45
|
* Add - Christian Clauss (@cclauss) to acknowledgementsTimothy Crosley2021-03-201-0/+1
|
* Bump version to 5.8.05.8.0masterTimothy Crosley2021-03-204-3/+4
|
* Merge pull request #1694 from PyCQA/issue/1566Timothy Edmund Crosley2021-03-203-1/+20
|\ | | | | Issue/1566
| * Fix issue #1566: Fixed single location parsed line separator isn't usedissue/1566Timothy Crosley2021-03-201-1/+7
| |
| * Fix test to ensure output is the sameTimothy Crosley2021-03-201-4/+4
| |
| * Add changelog entry for issue #1566Timothy Crosley2021-03-191-0/+1
| |
| * Create failing test for issue #1566Timothy Crosley2021-03-191-0/+12
|/
* Fixed #1594: incorrect placement of noqa comments with multiple from imports.Timothy Crosley2021-03-183-5/+32
|
* Resolved #1504: Added ability to push star imports to the top to avoid ↵Timothy Crosley2021-03-175-0/+41
| | | | overriding explicitly defined imports.
* Merge pull request #1693 from PyCQA/issue/1645Timothy Edmund Crosley2021-03-176-3/+47
|\ | | | | Issue/1645
| * Add support for reversing import sortTimothy Crosley2021-03-172-3/+9
| |
| * Add test case for issue #1645: Allowing sort order to be reversedTimothy Crosley2021-03-171-0/+30
| |
| * Add to changelog Implemented #1645: Ability to reverse the import sorting order.issue/1645Timothy Crosley2021-03-161-0/+1
| |
| * Add config option for reversing sort orderTimothy Crosley2021-03-162-0/+7
|/
* Merge pull request #1692 from PyCQA/issue/1688Timothy Edmund Crosley2021-03-154-30/+67
|\ | | | | Issue/1688
| * Fix issue #1688: from statements removed when invalidTimothy Crosley2021-03-152-30/+45
| |
| * Add test case to ensure incorrectly formatted from statements dont disapearTimothy Crosley2021-03-151-0/+21
| |
| * Add entry to changelog for issue #1688Timothy Crosley2021-03-151-0/+1
|/
* Merge pull request #1691 from cclauss/patch-3Timothy Edmund Crosley2021-03-143-8/+8
|\ | | | | GitHub Actions: Upgrade actions/cache and actions/setup-python
| * Update integration.ymlChristian Clauss2021-03-141-2/+2
| |
| * Update test.ymlChristian Clauss2021-03-141-4/+4
| |
| * setup-pythonChristian Clauss2021-03-141-1/+1
| |
| * GitHub Actions: Upgrade actions/cacheChristian Clauss2021-03-141-1/+1
|/ | | https://github.com/actions/cache/releases
* Resolve #1684: Add support for --extend-skip and --extend-skip-globTimothy Crosley2021-03-134-6/+45
|
* Added changelog entry for #1685Timothy Crosley2021-03-121-0/+1
|
* Add - @dongfangtianyu to acknowledgements fileTimothy Crosley2021-03-111-0/+1
|
* Update config option docsTimothy Crosley2021-03-111-14/+49
|
* Merge pull request #1689 from gofr/1685/document-skipTimothy Edmund Crosley2021-03-111-1/+3
|\ | | | | Clarify documentation for --skip option
| * fixup! fixup! Clarify documentation for --skip optiongofr2021-03-111-1/+1
| |
| * fixup! Clarify documentation for --skip optiongofr2021-03-111-1/+1
| |
| * Clarify documentation for --skip optiongofr2021-03-111-1/+3
|/ | | | | | | | | | | | | | The --skip option only handles full file paths or names of individual path components. For example, "foo/bar/baz.py" can be used to skip just that file. And "foo" would skip any files with that name and any files nested in directories with that name. On the other hand, "foo/bar" does *not* skip everything in the "foo/bar" directory. --skip-glob can be used to achieve this. Attempt to clarify the documentation to say that.
* Merge pull request #1664 from ↵Timothy Edmund Crosley2021-03-104-1/+85
|\ | | | | | | | | gofr/issue/1659/force-sort-sections-with-relative-imports Sort relative imports correctly with force_sort_within_sections
| * Merge branch 'develop' into issue/1659/force-sort-sections-with-relative-importsTimothy Edmund Crosley2021-03-1014-302/+521
| |\ | |/ |/|
* | Merge combinabele if statements as recommended by deepsourceTimothy Crosley2021-03-051-21/+18
| |
* | Implemented #1638 / #1644: Provide a flag to ensure same file handle is ↵Timothy Crosley2021-03-046-1/+20
| | | | | | | | used after sorting.
* | Merge pull request #1682 from PyCQA/issue/1667Timothy Edmund Crosley2021-03-033-51/+72
|\ \ | | | | | | Issue/1667
| * | Merge if statements per deepsourceTimothy Crosley2021-03-031-14/+14
| | |
| * | Fixed #1667: ChangelogTimothy Crosley2021-03-031-0/+1
| | |
| * | Don't add newlines if there are is no outputTimothy Crosley2021-03-031-37/+40
| | |
| * | Fix indentationTimothy Crosley2021-03-031-1/+1
| | |
| * | Create failing test for issue #1667issue/1667Timothy Crosley2021-03-021-0/+17
|/ /
* | Merge pull request #1680 from PyCQA/issue/1668Timothy Edmund Crosley2021-03-014-194/+259
|\ \ | | | | | | Issue/1668
| * | Add test for allowing root, switch to allow root commandTimothy Crosley2021-03-012-7/+10
| | |
| * | Update dependenciesTimothy Crosley2021-03-011-193/+240
| | |
| * | Fixed #1668Timothy Crosley2021-03-011-1/+2
| | |