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

Duplicate module silently replaces existing module in dmypy recheck --update #6653

Open
ilevkivskyi opened this issue Apr 10, 2019 · 0 comments

Comments

@ilevkivskyi
Copy link
Member

If one has these two files:

# [file a/mod.py]
# empty

# [file b/mod.py]
42 + 'no'

and there are no __init__.py[i] files in the directories, then running dmypy produces the following result:

$ dmypy start -- --follow-import=skip
Daemon started
$ dmypy check a/mod.py 
$ dmypy recheck --update b/mod.py
b/mod.py:1: error: Unsupported operand types for + ("int" and "str")
$ dmypy recheck --remove b/mod.py
b/mod.py:1: error: Unsupported operand types for + ("int" and "str")
$ dmypy recheck --update a/mod.py
b/mod.py:1: error: Unsupported operand types for + ("int" and "str")

The problem here is twofold:

  • When we first trying to add the duplicate module, this should cause a blocking error, as in normal/incremental run instead of silently replacing the other module.
  • Even after one tries to remove the problematic module, it stays in build causing errors in all subsequent runs independently of what is done (except just stopping the daemon).

This is high priority because it causes troubles when adding files in existing large codebases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant