Skip to content

Clarify difference between disallow_untyped_defs and disallow_incomplete_defs#15247

Merged
hauntsaninja merged 3 commits intopython:masterfrom
ikonst:docs-disallow_untyped_defs
May 18, 2023
Merged

Clarify difference between disallow_untyped_defs and disallow_incomplete_defs#15247
hauntsaninja merged 3 commits intopython:masterfrom
ikonst:docs-disallow_untyped_defs

Conversation

@ikonst
Copy link
Copy Markdown
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]


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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Contributor Author

ikonst commented May 17, 2023

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

@hauntsaninja
Copy link
Copy Markdown
Collaborator

Thanks for improving this!

@hauntsaninja hauntsaninja merged commit 2e6d11e into python:master May 18, 2023
@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