Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot override disallow_subclassing_any for matplotlib.* in pyproject.toml #15250

Open
bersbersbers opened this issue May 16, 2023 · 0 comments
Labels
bug mypy got something wrong topic-configuration Configuration files and flags topic-disallow-any The disallow-any-* family of flags

Comments

@bersbersbers
Copy link

bersbersbers commented May 16, 2023

Bug Report

I cannot override disallow_subclassing_any for matplotlib.* in pyproject.toml

To Reproduce

"""False-positive 'Class cannot subclass'."""
from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg

class Class(FigureCanvasQTAgg):
    """Class."""

Expected Behavior

No error

Actual Behavior

bug.py:4: error: Class cannot subclass "FigureCanvasQTAgg" (has type "Any")  [misc]
Found 1 error in 1 file (checked 1 source file)

Your Environment

  • Mypy version used: mypy 1.3.0 (compiled: yes)
  • Mypy command-line flags: none
  • Mypy configuration options from mypy.ini (and other config files): see below
  • Python version used: 3.11.3

pyproject.toml

[tool.mypy]
ignore_missing_imports = false  # this works
disallow_subclassing_any = true # this works

[[tool.mypy.overrides]]
module = "matplotlib.*"
ignore_missing_imports = true    # this works
disallow_subclassing_any = false # this does not
@bersbersbers bersbersbers added the bug mypy got something wrong label May 16, 2023
@AlexWaygood AlexWaygood added topic-configuration Configuration files and flags topic-disallow-any The disallow-any-* family of flags labels May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong topic-configuration Configuration files and flags topic-disallow-any The disallow-any-* family of flags
Projects
None yet
Development

No branches or pull requests

2 participants