8000 Need a solution for long lines in Python 2 · Issue #534 · python/typing · GitHub
[go: up one dir, main page]

Skip to content
Need a solution for long lines in Python 2  #534
Closed
@stephenfin

Description

@stephenfin

This is a continuation of #186 and, like that change, has also been reported to mypy. I propose reading onto the following line for comments:

import collections
from typing import DefaultDict, List


def test(pools):
    really_long_attribute = collections.defaultdict(list)
    # type: DefaultDict[str, List[str]]
    for pool in pools:
        pass  # meaningful stuff in here

This seems clear enough and should require minimal changes to the parser. I'm happy to propose an amendment to the PEP, but I'd like to get some input first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0