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

False negative R0204 on async functions #1279

Closed
rudineirk opened this issue Jan 13, 2017 · 2 comments
Closed

False negative R0204 on async functions #1279

rudineirk opened this issue Jan 13, 2017 · 2 comments

Comments

@rudineirk
Copy link

Steps to reproduce

With async functions, pylint is returning false negative for variable type redefinition (R0204)

Some examples that cause the error:

async def test_a():
    data = [
        {'test': 1},
        {'test': 2},
    ]
    return data

async def test_b():
    data = {'test': 1}
    return data
class Test:
    async def test_a(self):
        data = [
            {'test': 1},
            {'test': 2},
        ]
        return data

    async def test_b(self):
        data = {'test': 1}
        return data

Current behavior

R:  7, 4: Redefinition of data type from list to dict (redefined-variable-type)

Expected behavior

no type redefinition messages

pylint --version output

pylint 1.6.4,
astroid 1.4.9
Python 3.5.2 (default, Sep 14 2016, 11:28:32)
[GCC 6.2.1 20160901 (Red Hat 6.2.1-1)]

@rudineirk rudineirk changed the title False negative r0204 False negative R0204 on async functions Jan 13, 2017
@PCManticore
Copy link
Contributor

redefined-variable-type is deprecated (actually moved into an extension, thus needing explicit activation). Please ignore it for now, since it has lots of edge cases.

@PCManticore
Copy link
Contributor

Forgot to mention that this is in the latest code from the master branch, not yet released in the wild.

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

No branches or pull requests

2 participants