pylint-dev / pylint

It's not just a linter that annoys you!
https://pylint.readthedocs.io/en/latest/
GNU General Public License v2.0
5.31k stars 1.14k forks source link

check cython super in comprehension error #8080

Open gshmu opened 1 year ago

gshmu commented 1 year ago

Current problem

cython can't using super() in list comprehension, assign a variable will fix this.

Desired solution

broken

class Any:
    def func(self):
        return [_ for _ in super().func()]

fixed

class Any:
    def func(self):
        var = super().func()
        return [_ for _ in var]

please add feature to check the cython broken.

Additional context

No response

DanielNoord commented 1 year ago

We don't officially support Cython do we? I feel like this warrants a plugin.

gshmu commented 1 year ago

pylint do checks very well, I think add flag to check cython will be better.