Skip to content

Rename --disallow-untyped-defs to --disallow-any=unannotated #3513

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

Merged
merged 4 commits into from
Jun 13, 2017

Conversation

ilinum
Copy link
Collaborator

@ilinum ilinum commented Jun 9, 2017

Previously, we were talking about naming this flag was --disallow-any=untyped. However, I think it's not clear without knowing the old name of the flag (--disallow-untyped-defs).

Naming suggestions are very welcome!

@JelleZijlstra
Copy link
Member

Honestly I prefer the old name; I find it much easier to understand what it does, because I don't have to think about the fact that unannotated defs implicitly use Any.

@gvanrossum
Copy link
Member

I'm with Jelle. I know Stas wants to use the new flag style. Let's have the old and the new name together for a while -- personally I expect that we haven't come up with the best API for these checks.

@ilinum
Copy link
Collaborator Author

ilinum commented Jun 9, 2017

I definitely see your point: --disallow-untyped-defs is more understandable than --disallow-any=unannotated

However, the idea behind --disallow-any option is to have one way to control all Anys in your code and we should have some way of disallowing untyped defs with the new flag.

That being said, I'm okay with the idea of having both of them co-exist.

@gvanrossum
Copy link
Member

gvanrossum commented Jun 9, 2017 via email

@ddfisher ddfisher self-assigned this Jun 9, 2017
@ilinum
Copy link
Collaborator Author

ilinum commented Jun 13, 2017

@ddfisher this PR is ready for review.

Copy link
Collaborator

@ddfisher ddfisher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

The flag aliasing is unfortunate, but I think it's the right thing for now.

@ddfisher ddfisher merged commit 20135b4 into python:master Jun 13, 2017
@ilinum ilinum deleted the disallow-any-unannotated branch June 13, 2017 20:20
@ilinum ilinum mentioned this pull request Jul 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants