Code Monkey home page Code Monkey logo

Comments (5)

carlio avatar carlio commented on July 21, 2024

I've tried this on a (very small) test case and cannot reproduce it. Could you create a test case, or point me at the code you're running prospector against?

from prospector.

carlio avatar carlio commented on July 21, 2024

Sorry, ignore me, I was running under Python 3

from prospector.

ssokolow avatar ssokolow commented on July 21, 2024

I just did some testing. You'll have to filter on print as well as C0325 since that code is too generic and is also used for legitimate messes like Unnecessary parens after u'if' keyword

from prospector.

carlio avatar carlio commented on July 21, 2024

I've been agonising about this one for a little bit. I think that the problem is a pylint one rather than a prospector one. My own feeling is that print(blah) is a bit suspect in Python 2, and since pylint will not warn if from __future__ import print_statement is used, then the warning is valid.

Having said that, a separate warning for print statements vs other statements would be useful, as there are valid reasons to supress the former without supressing the latter.

Check out the discussion on the code-quality mailing list about this very issue : https://www.mail-archive.com/[email protected]/msg00202.html

I will create a pull request on pylint itself about this to create a new error message, which will make it a lot easier for prospector to ignore. It's not particularly easy to ignore messages based on context right now.

from prospector.

yarko avatar yarko commented on July 21, 2024

... just to log it correctly, for the record: it's from __future__ import print_function

from prospector.

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.