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

Compare observed types to existing type annotations #288

Open
cleder opened this issue Mar 26, 2023 · 1 comment
Open

Compare observed types to existing type annotations #288

cleder opened this issue Mar 26, 2023 · 1 comment

Comments

@cleder
Copy link
Contributor

cleder commented Mar 26, 2023

Use cases:

  • I want to know if my tests test for every allowed input type
  • I want to know if any of my existing allowed types (e.g: Union[str, int]) are unused in practice and can be removed.
@carljm
Copy link
Contributor

carljm commented Mar 31, 2023

Sounds useful! This feature shouldn't be hard to implement; effectively we need to do an "apply" in "override all existing annotations" mode, and then diff the result with the original file.

I suggest monkeytype diff <modulename> as the CLI.

PR welcome!

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

2 participants