KEMBAR78
Configuration file recognizes dash as correct but results in broken config · Issue #4753 · python/mypy · GitHub
Skip to content

Configuration file recognizes dash as correct but results in broken config #4753

@chingc

Description

@chingc

mypy doesn't seem to be able to recognize dashed-options as incorrect within the context of a config file.

For example, suppose we have the following files nothing.py and mypy.ini

def nothing():
    pass
[mypy]
X = True

When X is:

  • disallow_untyped_defs
    • Correctly reports nothing.py:1: error: Function is missing a type annotation
  • disallow_untyped_defs1
    • Correctly reports: mypy.ini: [mypy]: Unrecognized option: disallow_untyped_defs1 = True
  • disallow-untyped-defs
    • Doesn't tell me I'm missing a type annotation, nor that the option is incorrect. No errors at all!

Python 3.6.4 and mypy 0.570 were used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions