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

Clarify difference between disallow_untyped_defs and disallow_incomplete_defs #15247

Merged
merged 3 commits into from
May 18, 2023

Conversation

ikonst
Copy link
Contributor

@ikonst ikonst commented May 15, 2023

Fixes #9963, #12693.

Previously addressed in #9964.

disallow_untyped_defs is a superset of disallow_incomplete_defs, as seen here:

The latter playground results in:

main.py:1: error: Function is missing a type annotation for one or more arguments  [no-untyped-def]

@@ -353,12 +353,17 @@ definitions or calls.
.. option:: --disallow-untyped-defs

This flag reports an error whenever it encounters a function definition
without type annotations.
with without type annotations or with incomplete type annotations.
Copy link

Choose a reason for hiding this comment

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

It looks like this "with" doesn't belong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ikonst
Copy link
Contributor Author

ikonst commented May 17, 2023

@hauntsaninja can take a look? (seeing as you've closed #9964)

@hauntsaninja
Copy link
Collaborator

Thanks for improving this!

@hauntsaninja hauntsaninja merged commit 2e6d11e into python:master May 18, 2023
20 checks passed
@ikonst ikonst deleted the docs-disallow_untyped_defs branch May 18, 2023 10:58
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.

disallow-untyped-defs vs disallow_incomplete_defs doc inconsistency
3 participants