GithubHelp home page GithubHelp logo

Comments (9)

pyflakes-bot avatar pyflakes-bot commented on August 28, 2024

Original comment by exarkun (@exarkun?) on Launchpad:


I'd rather fix the bugs in pyflakes that lead to spurious warnings.

from pyflakes.

pyflakes-bot avatar pyflakes-bot commented on August 28, 2024

Original comment by bukzor on Launchpad:


We have some questionable-but-necessary code which uses globals().update(). The of course causes pyflakes to freak out about undefined variables. I'd like to be able to ignore those warnings, instead of ignoring pyflakes altogether.

from pyflakes.

pyflakes-bot avatar pyflakes-bot commented on August 28, 2024

Original comment by esz-michel on Launchpad:


@sinzui: Can you link to the changeset? I am curious to see how this was implemented. Sorry if the link is already available somewhere, but I could noit find it :\

I would really like this feature as well, but more fine-grained as proposed. For example, pylint allows you to disable a specific error-code (see http://www.logilab.org/card/pylint_manual#messages-control). Or, the Java @SuppressWarnings annotation also allows you to ignore specific warnings.

I find the proposed solution to simply ignore pyflakes altogether is a bit like a "except Exception": You might miss other errors ;)

from pyflakes.

pyflakes-bot avatar pyflakes-bot commented on August 28, 2024

Original comment by sinzui on Launchpad:


Adi extended PyFlakesChecker to accept the raw text of the module being checked. The report() method looks of the line number of warning/error and in the text and looks for "# pyflakes:ignore". The report returns early if the comment is present.
https://code.launchpad.net/~adiroiban/pocket-lint/907742/+merge/102882

from pyflakes.

pyflakes-bot avatar pyflakes-bot commented on August 28, 2024

Original comment by adiroiban (@adiroiban?) on Launchpad:


Hi,

Right now, pyflakes messages do not have a ID for each message class. In pylint each message class has its own ID.

I agree that this all or nothing filter can lead to other troubles. I will check to see if pyflakes developers would like to accept a patch to pyflakes to add IDs for each message class, and then we can improve the current pocketlint filter.

from pyflakes.

pyflakes-bot avatar pyflakes-bot commented on August 28, 2024

Original comment by bukzor on Launchpad:


Alternative solution: use a pylintrc that is only roughly as picky as pyflakes.

from pyflakes.

pyflakes-bot avatar pyflakes-bot commented on August 28, 2024

Original comment by glyph on Launchpad:


There's already a bug for automatically detecting the entirely detectable class of error in the example here, isn't there? It would be so much nicer to do that than to encourage users to drop these comment turds into their code.

from pyflakes.

pyflakes-bot avatar pyflakes-bot commented on August 28, 2024

Original comment by exarkun (@exarkun?) on Launchpad:


More than one:

https://bugs.launchpad.net/pyflakes/+bug/885140
https://bugs.launchpad.net/pyflakes/+bug/800691
https://bugs.launchpad.net/pyflakes/+bug/916264

Probably others. Fixing these real problems would be a great win for all pyflakes users.

from pyflakes.

pyflakes-bot avatar pyflakes-bot commented on August 28, 2024

Original comment by florent.x (@florentx?) on Launchpad:


Issues 800691 and 916264 and many others were fixed with Pyflakes 0.6.1.

If you really want to use comments to disable some checks, try Flake8.

But the recommended path is to open an issue if it looks like a limitation of Pyflakes.

from pyflakes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.