Skip to content

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

Closed

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.)

Activity

  1. changed the title [-]Add more test cases forr --warn-no-return[/-] [+]Add more test cases for --warn-no-return[/+] on Oct 20, 2016
  2. added this to the milestone on Oct 20, 2016
  3. removed this from the milestone on Mar 29, 2017
  4. msullivan commented on Jan 28, 2020

    @msullivan
    Collaborator

    It's been 3 years and it seems to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions