isort

A Python utility / library to sort imports.

MIT License

Downloads
56.7M
Stars
6.4K
Committers
290

Bot releases are hidden (Show)

isort - 5.5.0

Published by timothycrosley about 4 years ago

5.5.0 September 3, 2020

  • Fixed #1398: isort: off comment doesn't work, if it's the top comment in the file.
  • Fixed #1395: reverse_relative setting doesn't have any effect when combined with force_sort_within_sections.
  • Fixed #1399: --skip can error in the case of projects that contain recursive symlinks.
  • Fixed #1389: ensure_newline_before_comments doesn't work if comment is at top of section and sections don't have lines between them.
  • Fixed #1396: comments in imports with ";" can keep isort from recognizing import line.
  • Fixed #1380: As imports removed when combine_star is set.
  • Fixed #1382: --float-to-top has no effect if no import is already at the top.
  • Fixed #1420: isort never settles on module docstring + add import.
  • Fixed #1421: Error raised when repo contains circular symlinks.
  • Fixed #1427: noqa comment is moved from star import to constant import.
  • Fixed #1444 & 1445: Incorrect placement of import additions.
  • Fixed #1447: isort5 throws error when stdin used on Windows with deprecated args.
  • Implemented #1397: Added support for specifying config file when using git hook (thanks @diseraluca!).
  • Implemented #1405: Added support for coloring diff output.
  • Implemented #1434: New multi-line grid mode without parentheses.

Goal Zero (Tickets related to aspirational goal of achieving 0 regressions for remaining 5.0.0 lifespan):

  • Implemented #1392: Extensive profile testing.
  • Implemented #1393: Proprety based testing applied to code snippets.
  • Implemented #1391: Create automated integration test that includes full code base of largest OpenSource isort users.

Potentially breaking changes:

  • Fixed #1429: --check doesn't print to stderr as the documentation says. This means if you were looking for ERROR: messages for files that contain incorrect imports within stdout you will now need to look in stderr.
isort - 5.4.2

Published by timothycrosley about 4 years ago

5.4.2 Aug 14, 2020

  • Fixed #1383: Known other does not work anymore with .editorconfig.
  • Fixed: Regression in first known party path expansion.
isort - 5.4.1

Published by timothycrosley about 4 years ago

5.4.1 [Hotfix] Aug 13, 2020

  • Fixed #1381: --combine-as loses # noqa in different circumstances.
isort - 5.4.0

Published by timothycrosley about 4 years ago

5.4.0 Aug 12, 2020

  • Implemented #1373: support for length sort only of direct (AKA straight) imports.
  • Fixed #1321: --combine-as loses # noqa.
  • Fixed #1375: --dont-order-by-type CLI broken.
isort - 5.3.2

Published by timothycrosley about 4 years ago

5.3.2 [Hotfix] Aug 7, 2020

  • Fixed incorrect warning code (W503->W0503).
isort - 5.3.1

Published by timothycrosley about 4 years ago

5.3.1 Aug 7, 2020

  • Improve upgrade warnings to be less noisy and point to error codes for easy interoperability with Visual Studio Code (see: #1363).
isort - 5.3.0

Published by timothycrosley about 4 years ago

5.3.0 Aug 4, 2020

  • Implemented ability to treat all or select comments as code (issue #1357)
  • Implemented ability to use different configs for different file extensions (issue #1162)
  • Implemented ability to specify the types of imports (issue #1181)
  • Implemented ability to dedup import headings (issue #953)
  • Added experimental support for sorting literals (issue #1358)
  • Added experimental support for sorting and deduping groupings of assignments.
  • Improved handling of deprecated single line variables for usage with Visual Studio Code (issue #1363)
  • Improved handling of mixed newline forms within same source file.
  • Improved error handling for known sections.
  • Improved API consistency, returning a boolean value for all modification API calls to indicate if changes were made.
  • Fixed #1366: spurious errors when combining skip with --gitignore.
  • Fixed #1359: --skip-gitignore does not honor ignored symlink

Internal Development:

  • Initial hypothesmith powered test to help catch unexpected syntax parsing and output errors (thanks @Zac-HD!)
isort - 5.2.2

Published by timothycrosley about 4 years ago

5.2.2 July 30, 2020

  • Fixed #1356: return status when arguments are passed in without files or a content stream.
isort - 5.2.1

Published by timothycrosley about 4 years ago

5.2.1 July 28, 2020

  • Update precommit to default to filtering files that are defined in skip.
  • Improved relative path detection for skip config usage.
  • Added recursive symbolic link protection.
  • Implemented #1177: Support for color output using --color.
  • Implemented recursive symlink detection support.
isort - 5.2.0

Published by timothycrosley about 4 years ago

5.2.0 July 27, 2020

  • Implemented #1335: Official API for diff capturing.
  • Implemented #1331: Warn when sections don't match up.
  • Implemented #1261: By popular demand, filter_files can now be set in the config option.
  • Implemented #960: Support for respecting git ignore via "--gitignore" or "skip_gitignore=True".
  • Implemented #727: Ability to only add imports if existing imports exist.
  • Implemented #970: Support for custom sharable isort profiles.
  • Implemented #1214: Added support for git_hook lazy option (Thanks @sztamas!)
  • Implemented #941: Added an additional multi_line_output mode for more compact formatting (Thanks @sztamas!)
  • Implemented #1020: Option for LOCALFOLDER.
  • Implemented #1353: Added support for output formatting plugins.
  • # isort: split can now be used at the end of an import line.
  • Fixed #1339: Extra indent is not preserved when isort:skip is used in nested imports.
  • Fixed #1348: --diff works incorrectly with files that have CRLF line endings.
  • Improved code repositories usage of pylint tags (#1350).
isort - 5.1.4

Published by timothycrosley over 4 years ago

5.1.4 July 19, 2020

  • Fixed issue #1333: Use of wrap_length raises an exception about it not being lower or equal to line_length.
  • Fixed issue #1330: Ensure stdout can be stubbed dynamically for show_unified_diff function.
isort - 5.1.3

Published by timothycrosley over 4 years ago

5.1.3 July 18, 2020

  • Fixed issue #1329: Fix comments duplicated when --fass option is set.
isort - 5.1.2

Published by timothycrosley over 4 years ago

5.1.2 July 17, 2020

  • Fixed issue #1219 / #1326: Comments not wrapped for long lines
  • Fixed issue #1156: Bug related to isort:skip usage followed by a multiline comment block
isort - 5.1.1

Published by timothycrosley over 4 years ago

5.1.1 July 15, 2020

  • Fixed issue #1322: Occasionally two extra newlines before comment with -n & --fss.
  • Fixed issue #1189: --diff broken when reading from standard input.
isort - 5.1.0

Published by timothycrosley over 4 years ago

5.1.0 July 14, 2020

  • isort now throws an exception if an invalid settings path is given (issue #1174).
  • Implemented support for automatic redundant alias removal (issue #1281).
  • Implemented experimental support for floating all imports to the top of a file (issue #1228)
  • Fixed #1178: support for semicolons in decorators.
  • Fixed #1315: Extra newline before comment with -n + --fss.
  • Fixed #1192: -k or --keep-direct-and-as-imports option has been deprecated as it is now always on.

Formatting changes implied:

  • Fixed #1280: rewrite of as imports changes the behavior of the imports.
isort - 5.0.9

Published by timothycrosley over 4 years ago

  • Fixed #1301: Import headings in nested sections leads to check errors
isort - 5.0.8

Published by timothycrosley over 4 years ago

  • Fixed #1277 & #1278: New line detection issues on Windows.
  • Fixed #1294: Fix bundled git hook.
isort - 5.0.7

Published by timothycrosley over 4 years ago

  • Fixed #1306: unexpected --diff behavior.
  • Fixed #1279: Fixed NOQA comment regression.
isort - 5.0.6

Published by timothycrosley over 4 years ago

  • Fixed #1302: comments and --trailing-comma can generate invalid code.
  • Fixed #1293: extra new line in indented imports, when immediately followed by a comment.
  • Fixed #1304: isort 5 no longer recognises sre_parse as a stdlib module.
  • Fixed #1300: add_imports moves comments following import section.
  • Fixed #1276: Fix a bug that creates only one line after triple quotes.
isort - 5.0.5

Published by timothycrosley over 4 years ago

5.0.5 July 7, 2020

  • Fixed #1285: packaging issue with bundling tests via poetry.
  • Fixed #1284: Regression when sorting .pyi files from CLI using black profile.
  • Fixed #1275 & #1283: Blank line after docstring removed.
  • Fixed #1298: CLI Help out of date with isort 5.
  • Fixed #1290: Unecessary blank lines above nested imports when import comments turned on.
  • Fixed #1297: Usage of --add-imports alongside --check is broken.
  • Fixed #1289: Stream usage no longer auto picking up config file from current working directory.
  • Fixed #1296: Force_single_line setting removes immediately following comment line.
  • Fixed #1295: ensure_newline_before_comments doesnt work with force_sort_within_sections.
  • Setting not_skip will no longer immediately fail but instead give user a warning and direct
    to upgrade docs.
Package Rankings
Top 0.58% on Pypi.org
Top 11.98% on Formulae.brew.sh
Top 3.25% on Alpine-edge
Top 3.84% on Proxy.golang.org
Top 1.47% on Alpine-v3.18
Top 4.55% on Alpine-v3.17
Badges
Extracted from project README
isort - isort your imports, so you don't have to. PyPI version Test Status Lint Status Code coverage Status License Join the chat at https://gitter.im/timothycrosley/isort Downloads Code style: black Imports: isort DeepSource Imports: isort