Skip to content

Add more test cases for --warn-no-return #2276

Closed
@JukkaL

Description

@JukkaL

Here are some ideas for additional test cases (as follow-up to #1748):

  • A try statement that returns almost everywhere but can fall through.
  • Empty function with a literal ... body, with or without a docstring.
  • For loops + missing return statements.
  • --warn-no-return and raise or assert False as the last thing in a function.
  • Nested try statements or loops.

(Sorry if some of these are already there.)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions