Thanks to visit codestin.com
Credit goes to github.com

Skip to content

(🐞) crash with --pretty from attrs raising an error in the wrong file #17535

Open
@KotlinIsland

Description

@KotlinIsland
> git clone https://github.com/DataDog/dd-trace-py
> cd dd-trace-py
> pip install -e .
> pip install mypy
> mypy --strict --check-untyped-defs | grep threading.py
ddtrace/profiling/collector/threading.py:25: error: Need type annotation for "recorder"  [var-annotated]
ddtrace/profiling/collector/threading.py:29: error: Function is missing a type annotation for one or more arguments  [no-untyped-def]
ddtrace/profiling/collector/threading.py:316: error: Need type annotation for "tracer"  [var-annotated]
> mypy --strict --check-untyped-defs --pretty
...
  File "mypy/main.py", line 100, in main
  File "mypy/main.py", line 182, in run_build
  File "mypy/build.py", line 192, in build
  File "mypy/build.py", line 266, in _build
  File "mypy/build.py", line 2942, in dispatch
  File "mypy/build.py", line 3340, in process_graph
  File "mypy/build.py", line 3465, in process_stale_scc
  File "mypy/errors.py", line 915, in file_messages
  File "mypy/errors.py", line 885, in format_messages
IndexError: list index out of range

threading.py:316: error, threading only has 43 lines in it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions