Skip to content

Replace --disallow-any flags with separate boolean flags. - #4178

Merged
gvanrossum merged 2 commits into
python:masterfrom
ilinum:split-disallow-any
Oct 30, 2017
Merged

gvanrossum merged 2 commits into
python:masterfrom
ilinum:split-disallow-any

Conversation

@ilinum

@ilinum ilinum commented Oct 29, 2017

Copy link
Copy Markdown
Collaborator

This PR also gets rid of --disallow-any=unannotated because it
is the same thing as --disallow-untyped-defs.

Fix #4089

This PR also gets rid of `--disallow-any=unannotated` because it
is the same thing as `--disallow-untyped-defs`.
Fix python#4089

@JelleZijlstra JelleZijlstra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Beautiful! I have a few new nits on the help strings, will post later.

Comment thread mypy/main.py Outdated
parser.add_argument('--disallow-any-unimported', default=False, action='store_true',
help="disallow usage of types that come from unfollowed imports")
parser.add_argument('--disallow-any-expr', default=False, action='store_true',
help='disallow all expressions in the module that have type Any')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd drop "in the module" since that's implicit (and you don't say it for the other flags).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yep!

Comment thread mypy/main.py Outdated
help="disallow various types of Any in a module. Takes a comma-separated "
"list of options (defaults to all options disabled)")
parser.add_argument('--disallow-any-unimported', default=False, action='store_true',
help="disallow usage of types that come from unfollowed imports")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe "disallow Any types resulting from unfollowed imports" ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yep, this seems reasonable! Done!

@gvanrossum
gvanrossum merged commit bf90e2c into python:master Oct 30, 2017
@gvanrossum

Copy link
Copy Markdown
Member

Thanks! Now I have a whole bunch of internal mypy.ini files to clean up...

@ilinum
ilinum deleted the split-disallow-any branch October 30, 2017 17:51
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.

3 participants