edaniszewski / pylint-quotes

Pylint plugin for checking the consistency of string quotes
MIT License
41 stars 12 forks source link

Wrong handling of `async def` #8

Closed prokher closed 6 years ago

prokher commented 6 years ago

I run PyLint with plugin pylint-quotes on the file:

async def the_function():
    """Function description"""
    ...

it reports

C: 20, 0: Invalid triple quote """, should be ''' (invalid-triple-quote)

if I remove async:

def the_function():
    """Function description"""
    ...

everything is fine. Looks like it interprets async def improperly.

The relevant part of the configuration is:

string-quote=single
triple-quote=single
docstring-quote=double
edaniszewski commented 6 years ago

Thanks for reporting this -- what version of python are you using, and what version of pylint do you have installed?

prokher commented 6 years ago

Here it is:

>>> pylint --version
Using config file <...>/pylintrc
pylint 1.8.2,
astroid 1.6.1
Python 3.6.4 (default, Jan  6 2018, 11:51:59)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]

>>> pip list | grep pylint
pylint (1.8.2)
pylint-django (0.9.0)
pylint-plugin-utils (0.2.6)
pylint-quotes (0.1.7)
edaniszewski commented 6 years ago

This should be fixed by #9 -- I've cut a new release (0.1.8) and pushed it up to pypi, so it should be good to go, but if there are still issues let me know! If it seems like its fixed, feel free to close this.

prokher commented 6 years ago

Thank you very much for quick fix. I confirm it works OK in 0.1.8.