github PyCQA/isort 10.0.0b1

pre-releaseone hour ago

This is the first beta for isort 10. This version will contain a breaking style change to align the handling of non-aliased from imports (e.g., from package import module) with ruff and fix some related bugs.
Like ruff, isort will now group these imports into one statement. For example: from package import module, module_two.

Please let us know whether this change causes unintended problems in your projects.

There are a couple of less signficiant breaking changes discussed below.

💥 Breaking Changes

  • Group non-aliased from imports by @DanielNoord in #2614
  • Drop Python 3.10 support by @DanielNoord with @Copilot in #2697
  • Remove shebang-based file detection by @DanielNoord with @Copilot in #2701
    Previously isort would open every file in the passed directories to see whether they contained a Python shebang line and then format these files. This is no longer supported and only files with the selected file extensions will be formatted. Not opening every file it encounters speeds up isort significantly.
  • Unify --version CLI arguments and always show quick guide by @DanielNoord in #2726

🚀 Features

🪲 Fixes

  • Keep the multiline layout of a sorted literal that has a trailing comment by @youdie006 in #2686
  • Fix combine_straight_imports mixing up module names on long lines by @APX403 in #2724
  • Respect extension filters for explicit files with --filter-files by @00200200 in #2720* Keep an import that follows an indented import block with lines_before_imports by @Eljees in #2672
  • Preserve atomic Cython output for write-only streams by @xiehuanyi in #2721
  • grid: preserve trailing comment when no line wrap is needed by @Master-Norna in #2675

Other changes

Full Changelog: 9.0.2...10.0.0b1

Don't miss a new isort release

NewReleases is sending notifications on new releases.