Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Add support for raiseerrror (inconsistent-return-statements) #30

Open
1 of 3 tasks
kasium opened this issue Jun 23, 2022 · 0 comments
Open
1 of 3 tasks

Add support for raiseerrror (inconsistent-return-statements) #30

kasium opened this issue Jun 23, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@kasium
Copy link

kasium commented Jun 23, 2022

Feature request type

  • Suppress false positives from existing pylint warnings
  • Add new pytest-specific warning
  • Other

Is your feature request related to a problem? Please describe.
pylint emits a warning if raiseerrror is used in combination with other returns

Describe the solution you'd like
Disable the warning

Describe alternatives you've considered
n/a

Sample code to demonstrate the current imperfect behavior

import pytest

FLAG = True

@pytest.fixture
def foo(request) -> str:
    if FLAG:
        return "huray"
    request.raiseerror("error")
@kasium kasium added the enhancement New feature or request label Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant