Code Monkey home page Code Monkey logo

Comments (3)

guykisel avatar guykisel commented on July 21, 2024

My investigation so far makes me think that the command line config settings already support multiple positional input paths, since prospector is passing nargs: * into setoptconf, which passes it into argparse, which interprets it according to https://docs.python.org/2.7/library/argparse.html#nargs

positional = (
        ('checkpath', {
            'help': 'The path to a Python project to inspect. Defaults to PWD'
                    '  if not specified.',
            'metavar': 'PATH',
            'nargs': '*',
        })

I think the key is that currently prospector only uses the first path in the list of paths:

    # Make it so
    prospector = Prospector(config, paths[0])
    prospector.execute()
    prospector.print_messages()

and Prospector is built around taking in a single path at initialization.

The solution seems to be either:

  1. Rewrite Prospector to allow specifying a list of paths
    or
  2. Iterate over the input paths, creating a new Prospector for each one and aggregating the resulting messages, then print a single summary for all of those messages.

from prospector.

guykisel avatar guykisel commented on July 21, 2024

Opened #78 for this issue.

from prospector.

carlio avatar carlio commented on July 21, 2024

I merged in #78 and you can now run prospector with

prospector file1.py path/to/file2.py ...

It will output all messages together followed by a summary. It's sort of equivalent to saying prospector . then explicitly ignoring any files you don't want checked.

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.