PyCQA / PyCQA/isort

Input with semicolon after multi-line import is corrupted

Open
#1,918 0 comments 1 reaction 2 assignees View on GitHub

@DanielNoord is already working on this.

Since Mar 31, 2026.

  • #2508 by @copilot-swe-agent — closed without merging
Dominant language
Python
Stars
7k
Forks
687
Avg merge
4h 56m
Merged PRs (30d)
2

Description

On this weird but valid input:

from os import \
    name; print(name)

isort (5.10.1 or main at c6a41965247a858a0afd848fbebfca18b8983917) produces this invalid output:

from os import name, name;, print

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.