Skip to content

[bug] Doesn't ignore explicit any on a single line #8759

Closed as not planned
Closed as not planned
@theoden-dd

Description

@theoden-dd
        body: Optional[Mapping[str, Any]] = None,  # type: ignore[misc] # noqa: F821
  • What is the actual behavior/output?
    file.py:17: error: Explicit "Any" is not allowed [misc]
    file.py:22: error: unused 'type: ignore' comment

Actually, I tried no-explicit-any and no-any-explicit as error code, but neither worked.

  • What is the behavior/output you expect?
    No errors.

  • What are the versions of mypy and Python you are using?
    Python 3.8.2 mypy 0.761

  • What are the mypy flags you are using? (For example --strict-optional)
    In setup.cfg:

show_error_codes = True
disallow_any_explicit = True

Related issue: #7239

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions