Skip to content

dmypy and mypy behave differently with same settings #8046

@kurtgn

Description

@kurtgn

Consider this example:

class Config:
    url = None

    def __init__(self) -> None:
        self.url = 'xxx'

mypy says there are no errors, but dmypy with the same settings finds one:

$ mypy example.py
Success: no issues found in 1 source file

$ dmypy run -- --follow-imports=skip example.py
Daemon started
example.py:3: error: Need type annotation for 'url'
Found 1 error in 1 file (checked 1 source file)

my package versions:


$ python --version
Python 3.6.5 :: Anaconda, Inc.
$ mypy --version
mypy 0.750

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions