Skip to content

mypy --show-traceback --show-error-codes src/ tests/ failing #19004

Closed as duplicate of#17671
@anshbansal

Description

@anshbansal

Bug Report

https://github.com/datahub-project/datahub/actions/runs/14757347168/job/41428929690?pr=13374

Traceback (most recent call last):
  File "mypy/semanal.py", line 7286, in accept
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at [https://github.com/python/mypy/issues](https://github.com/python/mypy/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen)
version: 1.14.1
/home/runner/work/datahub/datahub/metadata-ingestion-modules/airflow-plugin/venv/lib/python3.10/site-packages/pydantic/env_settings.py:23: : note: use --pdb to drop into pdb
  File "mypy/nodes.py", line 1196, in accept
  File "mypy/semanal.py", line 1787, in visit_class_def
  File "mypy/semanal.py", line 2003, in analyze_class
  File "mypy/semanal.py", line 2050, in analyze_class_body_common
  File "mypy/semanal.py", line 2135, in apply_class_plugin_hooks
  File "pydantic/mypy.py", line 154, in pydantic.mypy.PydanticPlugin._pydantic_model_class_maker_callback
  File "pydantic/mypy.py", line 317, in pydantic.mypy.PydanticModelTransformer.transform
  File "pydantic/mypy.py", line 497, in pydantic.mypy.PydanticModelTransformer.add_construct_method
  File "mypy/types.py", line 614, in __init__
TypeError: mypy.types.TypeVarId object expected; got int

In this datahub-project/datahub#13374
Got this error https://github.com/datahub-project/datahub/actions/runs/14757347168/job/41428929690?pr=13374

Expected Behavior

Actual Behavior

Your Environment

  • Mypy version used: 1.14.1
  • Mypy command-line flags: mypy --show-traceback --show-error-codes src/ tests/
  • Mypy configuration options from mypy.ini (and other config files):
  • Python version used: 3.10.x

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