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

Skip to content

"_RmtreeType" not callable when passed to functools.partial on Python 3.12 #18637

Description

@Avasam

Bug Report

See reproducer, it's that simple. Probably partially caused by the 3.12+ definition of _RmtreeType on typeshed overloading the __call__ definition

To Reproduce

import functools, shutil
functools.partial(shutil.rmtree)

Expected Behavior

No error

Actual Behavior

error: "_RmtreeType" not callable [misc]

Your Environment

  • Mypy version used: mypy 1.15.0 (compiled: yes)
  • Mypy command-line flags: None
  • Mypy configuration options from mypy.ini (and other config files): None
  • Python version used: 3.12.0 and 3.13.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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