Skip to content

Crash on latest Django Project with dmypy #11456

Closed
@Thorbenl

Description

@Thorbenl

Bug Report

Canot run mypy on latest django, mypy and django-stubs version. started crashin after updating django from 3.2.8 to 3.2.9

Expected Behavior

normal typecheck run

Actual Behavior
crashes with:

Daemon started
Daemon crashed!
Traceback (most recent call last):
  File "mypy/dmypy_server.py", line 221, in serve
  File "mypy/dmypy_server.py", line 264, in run_command
  File "mypy/dmypy_server.py", line 323, in cmd_run
  File "mypy/dmypy_server.py", line 380, in check
  File "mypy/dmypy_server.py", line 410, in initialize_fine_grained
  File "mypy/build.py", line 179, in build
  File "mypy/build.py", line 253, in _build
  File "mypy/build.py", line 2638, in dispatch
  File "mypy/build.py", line 2962, in process_graph
  File "mypy/build.py", line 3071, in process_stale_scc
  File "mypy/build.py", line 2172, in finish_passes
  File "mypy/build.py", line 2220, in update_fine_grained_deps
  File "mypy/build.py", line 2211, in compute_fine_grained_deps
  File "mypy/server/deps.py", line 114, in get_dependencies
  File "mypy/nodes.py", line 305, in accept
  File "mypy/server/deps.py", line 176, in visit_mypy_file
  File "mypy/traverser.py", line 35, in visit_mypy_file
  File "mypy/nodes.py", line 950, in accept
  File "mypy/server/deps.py", line 239, in visit_class_def
  File "mypy/traverser.py", line 71, in visit_class_def
  File "mypy/nodes.py", line 1015, in accept
  File "mypy/server/deps.py", line 351, in visit_block
  File "mypy/traverser.py", line 39, in visit_block
  File "mypy/nodes.py", line 687, in accept
  File "mypy/server/deps.py", line 201, in visit_func_def
  File "mypy/traverser.py", line 54, in visit_func_def
  File "mypy/traverser.py", line 51, in visit_func
  File "mypy/nodes.py", line 1015, in accept
  File "mypy/server/deps.py", line 351, in visit_block
  File "mypy/traverser.py", line 39, in visit_block
  File "mypy/nodes.py", line 1073, in accept
  File "mypy/server/deps.py", line 403, in visit_assignment_stmt
  File "mypy/server/deps.py", line 463, in process_lvalue
  File "mypy/server/deps.py", line 495, in get_non_partial_lvalue_type
AssertionError

(Write what happened.)

Your Environment

  • mypy==0.812
  • django-stubs==1.8.0
  • Python version used: 3.9.8
  • Operating system and version: MacOS 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions