Code Monkey home page Code Monkey logo

Comments (2)

carlio avatar carlio commented on July 21, 2024

There's a special case for pylint to collapse multiple unused imports into one message. This came about because of from foo import * could cause 100 unused import warnings. However, from your example, I agree there should be one per unused import when multiple imports are explicitly specified. I'll change the logic to only collapse if a * import is used.

from prospector.

techdragon avatar techdragon commented on July 21, 2024

Wouldn't it be best to throw the warning that import * is wrong and silence further errors from the import statement instead of actually checking for all the unused imported results of an import * statement? It's pretty much universally accepted that import * is bad code! is it actually necessary to check what it imports and use those results? It should either be replaced with explicit imports or a library/module import and use of the module/library prefix. 

Sent from Molto for iPad

From: carlio
Sent: Tuesday, July 08, 2014 01:08 am
To: landscapeio/prospector
Cc: Samuel Bishop
Subject: Re: [prospector] only one error of each type per line (#30)

There's a special case for pylint to collapse multiple unused imports into one message. This came about because of from foo import * could cause 100 unused import warnings. However, from your example, I agree there should be one per unused import when multiple imports are explicitly specified. I'll change the logic to only collapse if a * import is used.


Reply to this email directly or view it on GitHub.

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.