Inspects Python source files and provides information about type and location of classes, methods etc

Overview

prospector

Latest Version of Prospector Build Status Code Health Test Coverage Documentation

About

Prospector is a tool to analyse Python code and output information about errors, potential problems, convention violations and complexity.

It brings together the functionality of other Python analysis tools such as Pylint, pep8, and McCabe complexity. See the Supported Tools documentation section for a complete list.

The primary aim of Prospector is to be useful 'out of the box'. A common complaint of other Python analysis tools is that it takes a long time to filter through which errors are relevant or interesting to your own coding style. Prospector provides some default profiles, which hopefully will provide a good starting point and will be useful straight away, and adapts the output depending on the libraries your project uses.

Installation

Prospector can be installed using pip by running the following command:

pip install prospector

Optional dependencies for Prospector, such as pyroma can also be installed by running:

pip install prospector[with_pyroma]

Some shells (such as Zsh, the default shell of macOS Catalina) require brackets to be escaped:

pip install prospector\[with_pyroma\]

For a list of all of the optional dependencies, see the optional extras section on the ReadTheDocs page on Supported Tools Extras.

For more detailed information on installing the tool, see the installation section of the tool's main page on ReadTheDocs.

Documentation

Full documentation is available at ReadTheDocs.

Usage

Simply run prospector from the root of your project:

prospector

This will output a list of messages pointing out potential problems or errors, for example:

prospector.tools.base (prospector/tools/base.py):
    L5:0 ToolBase: pylint - R0922
    Abstract class is only referenced 1 times

Options

Run prospector --help for a full list of options and their effects.

Output Format

The default output format of prospector is designed to be human readable. For parsing (for example, for reporting), you can use the --output-format json flag to get JSON-formatted output.

Profiles

Prospector is configurable using "profiles". These are composable YAML files with directives to disable or enable tools or messages. For more information, read the documentation about profiles.

If your code uses frameworks and libraries

Often tools such as pylint find errors in code which is not an error, for example due to attributes of classes being created at run time by a library or framework used by your project. For example, by default, pylint will generate an error for Django models when accessing objects, as the objects attribute is not part of the Model class definition.

Prospector mitigates this by providing an understanding of these frameworks to the underlying tools.

Prospector will try to intuit which libraries your project uses by detecting dependencies and automatically turning on support for the requisite libraries. You can see which adaptors were run in the metadata section of the report.

If Prospector does not correctly detect your project's dependencies, you can specify them manually from the commandline:

prospector --uses django celery

Additionally, if Prospector is automatically detecting a library that you do not in fact use, you can turn off autodetection completely:

prospector --no-autodetect

Note that as far as possible, these adaptors have been written as plugins or augmentations for the underlying tools so that they can be used without requiring Prospector. For example, the Django support is available as a pylint plugin.

Strictness

Prospector has a configurable 'strictness' level which will determine how harshly it searches for errors:

prospector --strictness high

Possible values are verylow, low, medium, high, veryhigh.

Prospector does not include documentation warnings by default, but you can turn this on using the --doc-warnings flag.

pre-commit

If you'd like Prospector to be run automatically when making changes to files in your Git repository, you can install pre-commit and add the following text to your repositories' .pre-commit-config.yaml:

repos:
-   repo: https://github.com/PyCQA/prospector
    rev: 1.1.7 # The version of Prospector to use, at least 1.1.7
    hooks:
    -   id: prospector

License

Prospector is available under the GPLv2 License.

Issues
  • vulture and pylint failing

    vulture and pylint failing

    For a very large code base ( https://github.com/OpenMDAO/OpenMDAO-Framework ) , I get this in the output

    .: L-:- None: pylint - failure Tool pylint failed to run (exception was raised)

    .: L-:- None: vulture - failure Tool vulture failed to run (exception was raised)

    There are no errors given by either tool as a result.

    I tried using pylint and vulture with some smaller codes and it worked fine.

    Great tool though!!!

    opened by hschilling 33
  • Diffrent behavoiur with different abs/relative arguments

    Diffrent behavoiur with different abs/relative arguments

    It is quite disappointing when overall project, separate file and folder checks give different results. Here is a little table showing results depended on arguments given.

    cmd --absolute-path PATH results
    not defined Full path to project . file folder
    relative abs relative abs code import-error ignored noqa
    -* ok
    `pwd` - * ok
    . - * ok
    lib/__init__.py - * ok
    `pwd`/lib/__init__.py - * fail *
    lib - * fail**
    `pwd`/lib - *fail**
    --absolute-path +* ok
    --absolute-path `pwd` + * ok
    --absolute-path . + * ok
    --absolute-path lib/__init__.py + * ok
    --absolute-path `pwd`/lib/__init__.py + * ok
    --absolute-path lib + * fail**
    --absolute-path `pwd`/lib + *fail**
    opened by meteozond 21
  • ImportError: No module named pylint_common

    ImportError: No module named pylint_common

    I've installed by cloning from git and then ran python setup.py install

    Traceback (most recent call last):
      File "/usr/local/bin/prospector", line 9, in <module>
        load_entry_point('prospector==0.5.1', 'console_scripts', 'prospector')()
      File "/usr/local/lib/python2.7/dist-packages/prospector-0.5.1-py2.7.egg/prospector/run.py", line 186, in main
        summary, messages = prospector.execute()
      File "/usr/local/lib/python2.7/dist-packages/prospector-0.5.1-py2.7.egg/prospector/run.py", line 131, in execute
        tool.prepare(self.path, self.ignores, self.config, self.adaptors)
      File "/usr/local/lib/python2.7/dist-packages/prospector-0.5.1-py2.7.egg/prospector/tools/pylint/__init__.py", line 83, in prepare
        adaptor.adapt_pylint(linter)
      File "/usr/local/lib/python2.7/dist-packages/prospector-0.5.1-py2.7.egg/prospector/adaptor/common.py", line 8, in adapt_pylint
        linter.load_plugin_modules(['pylint_common'])
      File "/usr/local/lib/python2.7/dist-packages/pylint-1.1.0-py2.7.egg/pylint/lint.py", line 357, in load_plugin_modules
        module = load_module_from_name(modname)
      File "/usr/local/lib/python2.7/dist-packages/logilab_common-0.61.0-py2.7.egg/logilab/common/modutils.py", line 125, in load_module_from_name
        return load_module_from_modpath(dotted_name.split('.'), path, use_sys)
      File "/usr/local/lib/python2.7/dist-packages/logilab_common-0.61.0-py2.7.egg/logilab/common/modutils.py", line 167, in load_module_from_modpath
        mp_file, mp_filename, mp_desc = find_module(part, path)
    ImportError: No module named pylint_common
    

    So I tried:

    [email protected]:~/workspace/oversight$ sudo pip install -U pylint-common
    Requirement already up-to-date: pylint-common in /usr/local/lib/python2.7/dist-packages/pylint_common-0.1-py2.7.egg
    Requirement already up-to-date: pylint>=1.0 in /usr/local/lib/python2.7/dist-packages/pylint-1.1.0-py2.7.egg (from pylint-common)
    Requirement already up-to-date: astroid>=1.0 in /usr/local/lib/python2.7/dist-packages/astroid-1.0.1-py2.7.egg (from pylint-common)
    Requirement already up-to-date: pylint-plugin-utils>=0.1 in /usr/local/lib/python2.7/dist-packages/pylint_plugin_utils-0.1.1-py2.7.egg (from pylint-common)
    Requirement already up-to-date: logilab-common>=0.53.0 in /usr/local/lib/python2.7/dist-packages/logilab_common-0.61.0-py2.7.egg (from pylint>=1.0->pylint-common)
    

    But that didn't help

    opened by obeleh 21
  • v1.1.6.4 still breaks pylint

    v1.1.6.4 still breaks pylint

    For versions 1.1.6.3 and 1.1.6.4 I get following error during our CI runs.

    We had no issue (except contradicting dependencies with flake8) before

    The related error log:

    $ prospector
    Messages
    ========
    
    .
      Line: None
        pylint: failure / Tool pylint failed to run (exception was raised)
    
    
    
    Check Information
    =================
             Started: 2019-06-13 08:48:04.082400
            Finished: 2019-06-13 08:48:19.840839
          Time Taken: 15.76 seconds
           Formatter: grouped
            Profiles: .prospector.yaml, no_doc_warnings, no_member_warnings, no_test_warnings, strictness_medium, strictness_high, strictness_veryhigh
          Strictness: from profile
      Libraries Used: 
           Tools Run: pep8, profile-validator, pyflakes, pylint
      Messages Found: 1
    
    ERROR: Job failed: exit status 1
    

    pip check output:

    $ cat pipcheck.txt
    No broken requirements found.
    

    Have to change our CI pipeline to add output of pip freeze

    opened by feenes 19
  • Pylint throws exception for unexpected keyword argument when running prospector.

    Pylint throws exception for unexpected keyword argument when running prospector.

    I was running prospector using python 3.6 and the latest version of prospector, but when attempting to run it, it would just throw the following error:

    Traceback (most recent call last):
      File "<redacted>/bin/prospector", line 11, in <module>
        sys.exit(main())
      File "<redacted>/lib/python3.6/site-packages/prospector/run.py", line 173, in main
        prospector.execute()
      File "<redacted>/lib/python3.6/site-packages/prospector/run.py", line 53, in execute
        for tool in self.config.get_tools(found_files):
      File "<redacted>/python3.6/site-packages/prospector/config/__init__.py", line 45, in get_tools
        config_result = tool.configure(self, found_files)
      File "<redacted>/python3.6/site-packages/prospector/tools/pylint/__init__.py", line 185, in configure
        config_messages += self._pylintrc_configure(pylintrc, linter)
      File "<redacted>/lib/python3.6/site-packages/prospector/tools/pylint/__init__.py", line 103, in _pylintrc_configure
        are_plugins_loaded = linter.config_from_file(pylintrc)
      File "<redacted>/lib/python3.6/site-packages/prospector/tools/pylint/linter.py", line 24, in config_from_file
        self.read_config_file(config_file, quiet=True)
    TypeError: read_config_file() got an unexpected keyword argument 'quiet'
    

    From reading through the prospector codebase and the pylint codebase, it looks like the line self.read_config_file(config_file, quiet=True) is using the old keyword argument quiet prior to it being updated to be verbose instead within pylint. This can be found in this commit: https://github.com/PyCQA/pylint/commit/49c6da5e7c90f7c53162fff1d8d9a2b6474ee28a#diff-ade2cfcf3e840a993dbd465f517d91f5.

    opened by justke86 16
  • Fix for pycodestyle not picking up modules in non-package dirs

    Fix for pycodestyle not picking up modules in non-package dirs

    As reported in #179, the pycodestyle/pep8 tool fails to

    • check Python files in the root PATH directory
    • non-package directories in PATH when driven by prospector.

    See the comments to #179 for more discussion.

    This PR takes the simple approach of using found_files.iter_module_paths() for explicit files mode and rootpath for "single directory arg" mode (leaving file lookup to pep8/pycodestyle) instead of iter_package_paths().

    Comes with extensive tests, also adding a bunch of tests for the general finder functionality.

    Edit: PR looks intimidating now judging by the number of commits, but note that the actual changes to the prospector codebase are small - it's mostly test additions... ;-)

    file-finder-rewrite 
    opened by hjoukl 16
  • [BUG] Not working with the last version of Pylint

    [BUG] Not working with the last version of Pylint

    Describe the bug Just not working with the last version of PyLint

    To Reproduce Steps to reproduce the behavior:

    1. Install last version of Prospector and Pylint
    2. Run prospector -X in an empty folder

    =>

    /home/sbrunner/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/setuptools/distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
      warnings.warn(
    Traceback (most recent call last):
      File "/home/sbrunner/.asdf/installs/python/3.8.6/bin/prospector", line 8, in <module>
        sys.exit(main())
      File "/home/sbrunner/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/prospector/run.py", line 183, in main
        prospector.execute()
      File "/home/sbrunner/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/prospector/run.py", line 69, in execute
        messages += tool.run(found_files)
      File "/home/sbrunner/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/prospector/tools/pylint/__init__.py", line 259, in run
        self._linter.check(self._args)
      File "/home/sbrunner/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 996, in check
        self._check_files(
      File "/home/sbrunner/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 1031, in _check_files
        with self._astroid_module_checker() as check_astroid_module:
      File "/home/sbrunner/.asdf/installs/python/3.8.6/lib/python3.8/contextlib.py", line 113, in __enter__
        return next(self.gen)
      File "/home/sbrunner/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 1150, in _astroid_module_checker
        checker.open()
      File "/home/sbrunner/.asdf/installs/python/3.8.6/lib/python3.8/site-packages/pylint/checkers/unsupported_version.py", line 51, in open
        self._py36_plus = py_version >= (3, 6)
    TypeError: '>=' not supported between instances of 'NoneType' and 'tuple'
    

    Expected behavior No output, no error

    Screenshots not applicable

    Environment (please complete the following information):

    • OS: Ubuntu Linux
    • Tool: pylint
    • Prospector version: 1.5.1
    • Python version: 3.8.6
    • Pylint / astroid versions: 2.12.1 / 2.9.0

    Additional context python3.8 -m pip freeze:

    affine==2.3.0
    aiocache==0.11.1
    alembic==1.6.5
    appdirs==1.4.4
    argcomplete==1.12.3
    arrow==1.1.0
    astor==0.7.1
    astroid==2.9.0
    attrs==21.2.0
    auto-changelog==0.5.3
    azure-core==1.15.0
    azure-storage-blob==12.9.0
    Babel==2.9.1
    backcall==0.2.0
    bandit==1.7.0
    bashcolor==1.1.1
    bcrypt==3.2.0
    Beaker==1.11.0
    binaryornot==0.4.4
    black==21.10b0
    bleach==3.3.0
    boto3==1.17.88
    botocore==1.20.88
    bottle==0.12.19
    c2c.template==2.3.0
    -e git+ssh://[email protected]/camptocamp/[email protected]#egg=c2cciutils
    c2cgeoform==2.1.23
    -e git+ssh://[email protected]/camptocamp/[email protected]#egg=c2cgeoportal_admin&subdirectory=admin
    -e git+ssh://[email protected]/camptocamp/[email protected]#egg=c2cgeoportal_commons&subdirectory=commons
    -e git+ssh://[email protected]/camptocamp/[email protected]#egg=c2cgeoportal_geoportal&subdirectory=geoportal
    -e git+ssh://[email protected]/camptocamp/[email protected]#egg=c2cwsgiutils
    CacheControl==0.12.6
    cached-property==1.5.2
    cachetools==4.2.2
    cachy==0.3.0
    cee-syslog-handler==0.6.0
    Cerberus==1.3.4
    certifi==2021.5.30
    cffi==1.14.5
    Chameleon==3.9.1
    changelog-builder==0.1.7
    chardet==4.0.0
    cleo==0.8.1
    click==7.1.2
    click-log==0.3.2
    click-plugins==1.1.1
    cligj==0.7.2
    clikit==0.6.2
    codespell==2.1.0
    colander==1.8.3
    ColanderAlchemy==0.3.4
    colorama==0.4.4
    commitizen==2.17.12
    confuse==1.5.0
    conventional==0.5.3
    conventional-commit==0.4.2
    cookiecutter==1.7.3
    crashtest==0.3.1
    cryptography==3.4.7
    cycler==0.10.0
    decli==0.5.2
    decorator==4.4.2
    deform==2.0.15
    defusedxml==0.7.1
    -e git+ssh://[email protected]/sbrunner/[email protected]#egg=deskew
    distlib==0.3.2
    distro==1.5.0
    docformatter==1.4
    docker==5.0.0
    docker-compose==1.29.2
    dockerpty==0.4.1
    docopt==0.6.2
    docutils==0.17.1
    dodgy==0.2.1
    dogpile.cache==1.1.3
    dotty-dict==1.3.0
    dparse==0.5.1
    easygui==0.98.2
    EasyProcess==0.3
    EditorConfig==0.12.3
    entrypoint2==0.2.4
    filelock==3.0.12
    Fiona==1.8.20
    flake8==3.8.4
    flake8-polyfill==1.0.2
    GeoAlchemy2==0.9.1
    geojson==2.5.0
    git-changelog==0.4.2
    gitdb==4.0.7
    GitPython==3.1.18
    gobang==0.1.0
    google-api-core==1.29.0
    google-api-python-client==2.2.0
    google-auth==1.30.1
    google-auth-httplib2==0.1.0
    google-auth-oauthlib==0.4.4
    googleapis-common-protos==1.53.0
    graphite==0.70
    graphyte==1.6.0
    greenlet==1.1.0
    gunicorn==20.1.0
    html5lib==1.1
    httplib2==0.19.1
    hupper==1.10.3
    idna==2.10
    imageio==2.9.0
    importlib-metadata==4.5.0
    influxdb==5.3.1
    iniconfig==1.1.1
    inotify==0.2.10
    invoke==1.6.0
    ipython==7.27.0
    iso8601==0.1.14
    isodate==0.6.0
    isoparser==0.3
    isort==5.8.0
    jedi==0.18.0
    jeepney==0.6.0
    Jinja2==2.11.3
    jinja2-time==0.2.0
    jira==3.0.1
    jmespath==0.10.0
    jsonref==0.2
    jsonschema==3.2.0
    jsonschema-gentypes==0.9.3
    jsonschema2md==0.2.0.post1
    keyring==21.8.0
    kiwisolver==1.3.1
    kubernetes==17.17.0
    lark-parser==0.11.3
    lazy-object-proxy==1.4.3
    lingua==4.14
    lnetatmo==2.1.0
    lockfile==0.12.2
    Mako==1.1.4
    mappyfile==0.9.1
    Markdown==3.3.4
    markdown-table==2020.12.3
    MarkupSafe==2.0.1
    matplotlib==3.4.2
    matplotlib-inline==0.1.2
    mccabe==0.6.1
    mp3play==0.1.15
    msgpack==1.0.2
    msrest==0.6.21
    mss==6.1.0
    munch==2.5.0
    mypy==0.901
    mypy-extensions==0.4.3
    networkx==2.5.1
    node-vm2==0.3.7
    nose==1.3.7
    numpy==1.21.0
    oauthlib==3.1.1
    opencv-python==4.5.3.56
    opentsdb-py==0.6.0
    orderedmultidict==1.0.1
    OWSLib==0.24.1
    packaging==20.9
    pandas==1.2.5
    papyrus==2.4
    paramiko==2.7.2
    parso==0.8.2
    passwordgenerator==1.4
    PasteDeploy==2.1.1
    pastel==0.2.1
    pathspec==0.9.0
    pbr==5.6.0
    pdfminer==20191125
    pdfminer.six==20200517
    pdfplumber==0.5.28
    pep517==0.11.0
    pep8-naming==0.10.0
    peppercorn==0.6
    pexpect==4.8.0
    pickleshare==0.7.5
    Pillow==8.2.0
    pip-shims==0.5.3
    pipenv==2021.11.15
    pipfile==0.0.2
    pkginfo==1.7.0
    plaster==1.0
    plaster-pastedeploy==0.7
    platformdirs==2.2.0
    playsound==1.3.0
    plette==0.2.3
    pluggy==0.13.1
    poetry==1.1.8
    poetry-core==1.0.4
    polib==1.1.1
    poyo==0.5.0
    prompt-toolkit==3.0.19
    prospector==1.5.1
    protobuf==3.17.2
    psycopg2==2.8.6
    psycopg2-binary==2.9.1
    ptyprocess==0.7.0
    py==1.10.0
    pyasn1==0.4.8
    pyasn1-modules==0.2.8
    pycairo==1.20.1
    pycodestyle==2.6.0
    pycparser==2.20
    pycryptodome==3.10.1
    pydocstyle==6.1.1
    pyflakes==2.2.0
    pygame==2.0.1
    Pygments==2.9.0
    PyGObject==3.40.1
    pyguetzli==1.0.9
    PyJWT==2.1.0
    pylev==1.4.0
    pylint==2.12.1
    pylint-celery==0.3
    pylint-django==2.4.4
    pylint-flask==0.6
    pylint-plugin-utils==0.6
    PyNaCl==1.4.0
    pyotp==2.6.0
    pyparsing==2.4.7
    PyPDF2==1.26.0
    pyperclip==1.8.2
    pyproj==3.1.0
    pyramid==1.10.8
    pyramid-beaker==0.8
    pyramid-chameleon==0.3
    pyramid-debugtoolbar==4.9
    pyramid-jinja2==2.8
    pyramid-mako==1.1.0
    pyramid-multiauth==0.9.0
    pyramid-tm==2.4
    pyroma==3.2
    pyrsistent==0.17.3
    pyscreenshot==3.0
    pytest==6.2.4
    python-dateutil==2.8.1
    python-dotenv==0.17.1
    python-editor==1.0.4
    python-gettext==4.0
    python-gitlab==2.9.0
    python-magic==0.4.22
    python-semantic-release==7.16.2
    python-slugify==4.0.1
    python-vlc==3.0.12118
    pytz==2021.1
    pyupgrade==2.19.4
    PyWavelets==1.1.1
    PyYAML==5.4.1
    pyyaml-include==1.2.post2
    questionary==1.9.0
    rasterio==1.2.6
    readme-renderer==29.0
    redis==3.5.3
    regex==2021.4.4
    repoze.lru==0.7
    requests==2.25.1
    requests-oauthlib==1.3.0
    requests-toolbelt==0.9.1
    requirements-detector==0.7
    requirementslib==1.5.16
    rfc3986==1.5.0
    rsa==4.7.2
    ruamel.yaml==0.17.17
    ruamel.yaml.clib==0.2.2
    runlike==0.7.0
    s3transfer==0.4.2
    safety==1.10.3
    -e git+ssh://[email protected]/sbrunner/[email protected]#egg=scan_to_paperless
    scikit-build==0.11.1
    scikit-image==0.18.2
    scipy==1.7.0
    -e git+ssh://[email protected]/gberaudo/[email protected]#egg=scrumtools
    SecretStorage==3.3.1
    semver==2.13.0
    sentry-sdk==1.1.0
    setoptconf==0.2.0
    setoptconf-tmp==0.3.1
    setuptools-scm==6.0.1
    Shapely==1.7.1
    -e git+ssh://[email protected]/camptocamp/[email protected]38#egg=shared_config_manager&subdirectory=app
    shellingham==1.4.0
    six==1.16.0
    smmap==4.0.0
    snowballstemmer==2.1.0
    snuggs==1.4.7
    sortedcontainers==2.4.0
    SQLAlchemy==1.3.23
    stevedore==3.3.0
    systemd==0.16.1
    termcolor==1.1.0
    text-unidecode==1.3
    texttable==1.6.3
    tifffile==2021.7.2
    -e git+ssh://[email protected]/camptocamp/[email protected]#egg=tilecloud
    -e git+ssh://[email protected]/camptocamp/[email protected]#egg=tilecloud_chain
    tk==0.1.0
    tokenize-rt==4.1.0
    toml==0.10.2
    tomli==1.1.0
    tomlkit==0.7.0
    tqdm==4.61.0
    traitlets==5.1.0
    transaction==3.0.1
    transifex-client==0.14.3
    translationstring==1.4
    twine==3.6.0
    typer==0.3.2
    types-pkg-resources==0.1.3
    types-PyYAML==5.4.3
    types-redis==3.5.16
    types-requests==2.25.0
    typing-extensions==3.10.0.0
    Unidecode==1.2.0
    universion==0.1.2
    UNKNOWN @ file:///home/external/workspace/helm-mapserver
    untokenize==0.1.1
    uritemplate==3.0.1
    urllib3==1.26.5
    venusian==3.0.0
    virtualenv==20.4.7
    virtualenv-clone==0.5.4
    vistir==0.5.2
    Wand==0.6.7
    wcwidth==0.2.5
    webencodings==0.5.1
    WebOb==1.8.7
    websocket-client==0.59.0
    whisper==1.1.8
    wrapt==1.12.1
    yoga==1.0.0
    yoga-image-optimizer==1.0.1
    yolk3k==0.9
    zipp==3.4.1
    zope.deprecation==4.4.0
    zope.event==4.5.0
    zope.interface==5.4.0
    zope.sqlalchemy==1.4
    zopflipy==1.5
    
    bug 
    opened by sbrunner 14
  • [BUG] / Question: python prospector became very slow. ANy new slow dependencies?

    [BUG] / Question: python prospector became very slow. ANy new slow dependencies?

    Prospector runs became very very slow.

    Does anybody else notice, that prospector became slower in the last few days. our CI runners do always freshly install prospector and do not version limit the dependencies.

    I wanted to know first whether anybody else is encountering such issues?

    I am still investigation, whether anything else changed in our CI infrastructure, but didn't find anything so far.

    If nobody encounters anything like that within the next few days, then I assume it's not an issue with a prospector dependency and this should just be closed.

    If however anybody encounter the same issues it would be interesting to indentify the dependency, that slows down

    investigate 
    opened by feenes 14
  • Python2 wheels contain incorrect dependency information

    Python2 wheels contain incorrect dependency information

    Using python2, pip install prospector fails with

    Collecting prospector
      Using cached https://files.pythonhosted.org/packages/8a/94/d1643eb5460f3accc4609e2fe14ffe9e6dab2b1014b047fccab68b3ee5cb/prospector-1.1.1-py2.py3-none-any.whl
    Collecting pylint>=2 (from prospector)
      Could not find a version that satisfies the requirement pylint>=2 (from prospector) (from versions: 0.15.2, 0.16.0, 0.18.0, 0.18.1, 0.19.0, 0.20.0, 0.21.0, 0.21.1, 0.21.2, 0.21.3, 0.22.0, 0.23.0, 0.24.0, 0.25.0, 0.25.1, 0.25.2, 0.26.0, 0.27.0, 0.28.0, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.9.0, 1.9.1, 1.9.2, 1.9.3)
    No matching distribution found for pylint>=2 (from prospector)
    

    while pip install prospector --no-binary prospector works as expected. This is probably due to incorrect dependency information in the universal wheel uploaded on PyPI.

    opened by greschd 14
  • astroid error when using flask dependencies

    astroid error when using flask dependencies

    Hi,

    On the latest prospector version (1.1.3), I noticed that I get an error when trying to use flask dependencies

    prospector --uses flask results in that error:

    Traceback (most recent call last):
      File "/usr/local/bin/prospector", line 11, in <module>
        sys.exit(main())
      File "/usr/local/lib/python3.6/site-packages/prospector/run.py", line 173, in main
        prospector.execute()
      File "/usr/local/lib/python3.6/site-packages/prospector/run.py", line 53, in execute
        for tool in self.config.get_tools(found_files):
      File "/usr/local/lib/python3.6/site-packages/prospector/config/__init__.py", line 41, in get_tools
        config_result = tool.configure(self, found_files)
      File "/usr/local/lib/python3.6/site-packages/prospector/tools/pylint/__init__.py", line 189, in configure
        self._prospector_configure(prospector_config, linter)
      File "/usr/local/lib/python3.6/site-packages/prospector/tools/pylint/__init__.py", line 37, in _prospector_configure
        linter.load_plugin_modules(['pylint_flask'])
      File "/usr/local/lib/python3.6/site-packages/pylint/lint.py", line 519, in load_plugin_modules
        module = modutils.load_module_from_name(modname)
      File "/usr/local/lib/python3.6/site-packages/astroid/modutils.py", line 196, in load_module_from_name
        return load_module_from_modpath(dotted_name.split('.'), path, use_sys)
      File "/usr/local/lib/python3.6/site-packages/astroid/modutils.py", line 239, in load_module_from_modpath
        module = imp.load_module(curname, mp_file, mp_filename, mp_desc)
      File "/usr/local/lib/python3.6/imp.py", line 245, in load_module
        return load_package(name, filename)
      File "/usr/local/lib/python3.6/imp.py", line 217, in load_package
        return _load(spec)
      File "<frozen importlib._bootstrap>", line 684, in _load
      File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 678, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/usr/local/lib/python3.6/site-packages/pylint_flask/__init__.py", line 79, in <module>
        MANAGER.register_transform(nodes.From,
    AttributeError: module 'astroid.nodes' has no attribute 'From'
    

    Here is my requirements.txt:

    prospector == 1.1.3
    pylint-flask == 0.5
    astroid == 2.0.4
    bandit == 1.4.0
    safety==1.4.0
    

    Please let me know if you need more details. I needed to specify pylint-flask directly, because even with --uses flask, the prospector did not downloaded pylint-flask automatically (not sure if it was meant to be downloaded automatically in that case).

    opened by johanngomes 13
  • Support latest pylint, pylint-django

    Support latest pylint, pylint-django

    The latest published version of pylint is 2.5.3, and the latest pylint-django is 2.2.0.

    I'm specifically interested in pylint-django 2.2.0 due to the rework of how string FK references are handled.

    enhancement 
    opened by ajhodges 12
  • [BUG] Timezone shenanigans with Django

    [BUG] Timezone shenanigans with Django

    Describe the bug When trying to run prospector on a Django project, "Finished" time seems to be taken from another time zone.

    To Reproduce

    $ django-admin startproject prospector_test
    $ cd prospector_test
    $ DJANGO_SETTINGS_MODULE=prospector_test.settings prospector
    ...
    Check Information
    =================
             Started: 2022-04-01 20:24:26.097744
            Finished: 2022-04-01 13:24:27.867276
          Time Taken: -25198.23 seconds
    

    Expected behavior Following is taken from prospector output when ran without DJANGO_SETTINGS_MODULE:

    Check Information
    =================
             Started: 2022-04-01 20:21:34.312963
            Finished: 2022-04-01 20:21:36.034789
          Time Taken: 1.72 seconds
    

    Environment (please complete the following information):

    • OS: Linux
    • Tool: probably pylint, as when I do not specify DJANGO_SETTINGS_MODULE time is calculated as expected
    • Prospector version: 1.1.7
    • Python version: 3.10.2

    Additional information

    I am in a UTC+7 time zone, so it seems that "Finished" time is from UTC+0.

    investigate 
    opened by rijenkii 0
  • Vulture configuration in pyproject.toml ignored

    Vulture configuration in pyproject.toml ignored

    Describe the bug Similar to #485 (which was not fixed for me on 1.7.6), vulture configuration in the pyproject.toml file is ignored.

    To Reproduce Run poetry run prospector in a project with a pyproject.toml that has vulture configuration (e.g. ignore-decorators configuration for @app.get, @app.post, etc.). I get vulture warnings about unused functions from prospector even though poetry run vulture <file> gives no warnings.

    Expected behavior Prospector should use any vulture configuration in the pyproject.toml.

    Environment

    • OS: Windows
    • Tool: vulture
    • Prospector version: 1.7.6
    • Python version: 3.10.2
    investigate 
    opened by noctuid 0
  • [BUG] No module named 'setoptconf'

    [BUG] No module named 'setoptconf'

    Describe the bug I try to run prospector and it throws a ModuleNotFoundError saying there isn't a module named setoptconf. Looking at the issues, it seems that this issue should have been solved? I've installed prospector using poetry if that matters? I've checked the lock file and the venv and both have the temporary package setoptconf-tmp installed.

    To Reproduce Steps to reproduce the behavior:

    1. Go to project root
    2. Call poetry run prospector <src_root>
    3. See error

    Expected behavior Prospector runs

    Environment (please complete the following information):

    • OS: linux
    • Prospector version: 1.7.7
    • Python version: 3.9.5

    Additional context I'm using with_mypy and with_bandit extras.

    investigate 
    opened by username-dot-com 0
  • [BUG] ignore-path is ignored when using explicit_file_mode

    [BUG] ignore-path is ignored when using explicit_file_mode

    Describe the bug The ignore-path config is ignored when using explicit file node. This is annoying when prospector is started from a pre-commit hook.

    To Reproduce Steps to reproduce the behavior:

    1. add "tests" to ignore-paths' in .prospector.yaml
    2. call prospector tests/XXX.py

    Expected behavior Ignore tests/XXXX/py

    Environment (please complete the following information):

    • OS: Linux
    • Prospector 1.7.7
    • Python version [e.g. 3.7.12]

    I could provide a fix if this behavior is unintentional.

    [ready for release] investigate 
    opened by flobz 2
  • [FEATURE REQUEST] discourage frosted

    [FEATURE REQUEST] discourage frosted

    Is your feature request related to a problem? Please describe. frosted does not work with python 3.10. That's natural because frosted is deprecated for some years. But when you install prospector[with_everything], frosted will be installed. Then if you run prospector -w frosted, you will get errors. Thus with_everything is discouraged.

    Describe the solution you'd like Where with_everything is introduced in the documentation, annotate to recommend with_pyroma,with_vulture,with_mypy,with_bandit instead as frosted is deprecated.

    Describe alternatives you've considered Stop supporting frosted. This is not good because backward compatibility will be broken.

    enhancement 
    opened by a-takahashi223 4
  • [BUG] no way to specify some mypy args

    [BUG] no way to specify some mypy args

    Describe the bug

    Hello, here are some very important options in mypy linter, like --ignore-missing-imports and --no-site-packages, prospector understands first one, but doesn't understand second one.

    To Reproduce

    prospector_profile.yml:

    mypy:
      run: true
      options:
        no-site-packages: true
        ignore-missing-imports: true
    

    main.py:

    import requests
    import this_module_not_exits
    

    prospector command:

    python -m prospector --profile prospector_profile.yml main.py --output-format json
    

    mypy command:

    python -m mypy --no-site-packages --ignore-missing-imports main.py
    

    running mypy command without args gives two errors:

    $ python -m mypy main.py 
    
    main.py:8: error: Library stubs not installed for "requests" (or incompatible with Python 3.10)
    main.py:8: note: Hint: "python3 -m pip install types-requests"
    main.py:8: note: (or run "mypy --install-types" to install all missing stub packages)
    main.py:8: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
    main.py:9: error: Cannot find implementation or library stub for module named "this_module_not_exits"
    Found 2 errors in 1 file (checked 1 source file)
    

    Adding first argument disables first error, and adding second argument disables second error.

    But not with prospector.

    If I commenting arguments for mypy in prospector_profile.yml:

    mypy:
      run: true
    #   options:
    #     no-site-packages: true
    #     ignore-missing-imports: true
    

    Then I getting same two errors. But if I uncommenting it, only second error disappears, while first error Library stubs not installed for "requests" still here.

    Expected behavior More universal way to specify arguments, for example:

    mypy:
      run: true
      options:
        - --no-site-packages
        - --ignore-missing-imports
    

    or:

    mypy:
      command:
        - python -m mypy --no-site-packages --ignore-missing-imports
    

    or:

    mypy:
      profile_path:
        - mypy_profile.ini
    

    Environment:

    • OS: Windows 11 Home 21H2 22000.527
    • Tool: mypy
    • Prospector version: 1.7.6
    • Python version: 3.10.2

    Additional context

    $ pip freeze
    
    astroid==2.9.3
    bandit==1.7.4
    certifi==2021.10.8
    charset-normalizer==2.0.12
    colorama==0.4.4
    docutils==0.18.1
    dodgy==0.2.1
    flake8==4.0.1
    flake8-polyfill==1.0.2
    frosted==1.4.1
    gitdb==4.0.9
    GitPython==3.1.27
    idna==3.3
    isort==5.10.1
    lazy-object-proxy==1.7.1
    mccabe==0.6.1
    mypy==0.940
    mypy-extensions==0.4.3
    pbr==5.8.1
    pep8-naming==0.10.0
    pies==2.6.7
    platformdirs==2.5.1
    prospector==1.7.6
    pycodestyle==2.8.0
    pydocstyle==6.1.1
    pyflakes==2.4.0
    Pygments==2.11.2
    pylint==2.12.2
    pylint-celery==0.3
    pylint-django==2.5.2
    pylint-flask==0.6
    pylint-plugin-utils==0.7
    pyroma==3.2
    PyYAML==6.0
    requests==2.27.1
    requirements-detector==0.7
    setoptconf-tmp==0.3.1
    smmap==5.0.0
    snowballstemmer==2.2.0
    stevedore==3.5.0
    toml==0.10.2
    tomli==2.0.1
    types-requests==2.27.11
    types-urllib3==1.26.10
    typing_extensions==4.1.1
    urllib3==1.26.8
    vulture==2.3
    wrapt==1.13.3
    
    investigate 
    opened by gmankab 1
Releases(1.8.0rc1)
  • 1.8.0rc1(Mar 18, 2022)

    Building on the rc0 release, with bugfixes to do with relative paths and absolute paths - prospector can now run in a directory and be pointed at any other directory.

    Other small bugfixes for path related changes in rc0.

    Source code(tar.gz)
    Source code(zip)
  • 1.8.0rc0(Mar 13, 2022)

    This is currently still a pre-release.

    File discovery fixes

    Finding paths and files to check has been replaced with a new version using pathlib - this should not result in any changes, except fixing an issue where pylint and pydocstyle were inspecting the same file or directory twice sometimes. However it may cause slightly different orders or reduce these duplicate warnings.

    The behaviour of prospector should be unchanged, apart from some bugfixes related to the old file discovery mechanism.

    Related bugs and PRs:

    • #480
    • #417
    • #199

    Other bugfixes

    • #106

    Misc

    Prospector now runs on itself without generating errors after all linting warnings were fixed

    Source code(tar.gz)
    Source code(zip)
  • 1.7.7(Mar 9, 2022)

  • 1.7.6(Mar 4, 2022)

    It's a bugs life.

    Fixes:

    • Fixed a problem where pylint was reporting the same message multiple times, because it was given a path to the file multiple times
    • The blending fix mentioned in the 1.7.5 release was actually not checked in by accident, this is there now.
    Source code(tar.gz)
    Source code(zip)
  • 1.7.5(Mar 1, 2022)

    Just say no to bugs.

    New:

    • Profile inheritance is now optional - appending a profile name with a ? means that if it is not found, prospector will simply continue. Read the documentation here. Closes #161

    Fixes:

    • Stopped the ProfileValidator tool raising errors about pep8 and pep257 sections being unknown. Instead, they raise deprecated warnings.
    • Blending works again - for example, pylint and pycodestyle errors representing the same thing are combined. After renaming pep8 to pycodestyle, this only worked when using legacy names.
    • Unrecognised Mypy options now raise an exception instead of silently carrying on - #455

    Tidyup:

    • Lots of warnings fixed from running prospector on itself
    Source code(tar.gz)
    Source code(zip)
  • 1.7.4(Feb 28, 2022)

    Mea culpa release

    Fix

    The effort to allow pylint configuration in pyproject.toml to be used as an external config source (#485) had the unintended side effect where any project using poetry would now use that configuration and thus would ignore the pylint configuration in the profile. This was true even if the pyproject.toml had no pylint directives in it.

    The behaviour has now been fixed where pylint will be configured using configuration from the profile first and then if any additional settings are found in a pylintrc or pyproject.toml or setup.cfg then these will override the profile configuration, instead of replacing it entirely.

    This also has the benefit of fixing #227 .

    Source code(tar.gz)
    Source code(zip)
  • 1.7.3(Feb 28, 2022)

    The war on bugs.

    Fixes:

    • Autodetect now does not die if a user does not have permissions (related to #271 and #487)
    • Fixed that some pylint documentation warning messages were not correctly included in the list of documentation warnings to squash if doc warnings are not desired.
    • Fixed the exit code for prospector - it was always 0 after the move to using poetry for packaging instead of 1 if errors were found (unless --zero-exit) was used. This now exits with the correct code based on the documented (and previous) behaviour.
    • Fix that pep8 would overwrite instead of inherit from previous pycodestyle blocks, same with pep257 - #491
    • Fix the pre-commit hook, as it could not run without being installed [with_everything], due to the "NotAvailableTool" class not properly implementing the abstract base class.
    • Improved documentation about the pre-commit hook as well to clarify its use better - #484
    Source code(tar.gz)
    Source code(zip)
  • 1.7.2(Feb 27, 2022)

    More bugfixes!

    Fixes:

    • Fix that pep8 and pep257 sections were renamed but the old deprecated values were not properly used to configure pycodestyle and pydocstyle - #491
    • Better handling for when the user running prospector is not able to read a file or directory - #271 and #487
    Source code(tar.gz)
    Source code(zip)
  • 1.7.1(Feb 26, 2022)

    Lots of smaller bugfixes in this release.

    Fixes:

    • Prospector now configures pylint using settings found in pyproject.toml or setup.cfg, not only .pylintrc - #485
    • Fixed --no-style-warnings command line argument no longer warning after renaming pep8 to pycodestyle - #488
    • Documentation is building again - #473
    • --with-tool flag now respects - but overrides - tools disabled in profiles - #447
    • Fixed crash with merging multiple import warnings - #477
    • Fixed segfault when analysing code using cartopy - #403
    Source code(tar.gz)
    Source code(zip)
  • 1.7.0(Feb 25, 2022)

    This is mostly a "tidying up" release in preparation for more useful code refactoring and feature improvement.

    New:

    • Added a --quiet command line option to suppress all output. Useful if you just want to know the exit code of prospector for scripting.
    • Removed the prospector "indent checker" since this is now no longer in pylint #482 <https://github.com/PyCQA/prospector/issues/482>_

    Fixes:

    Deprecation warning:

    • Tools pep8 and pep257 have been renamed to pycodestyle and pydocstyle respectively. This is because the tools themselves were renamed years ago - See #222. Note that this means that prospector profiles and message output uses this new name instead of the old name, so you will need to update your configuration. The old names will still work, but this legacy behaviour will be removed in prospector 2.0
    • There is now a --legacy-tool-names flag for outputting pep8 or pep257 as the tool name when outputting errors. This is to be backwards compatible with any parsing logic; this flag is also deprecated and will go away in prospector 2.0

    Tidying up

    These are all internal prospector code quality improvements.

    • #467 - Removed nosetests, as nose is not compatible with Python 3.10 yet and the pytest tests were already doing the same thing
    • Tidied up the tox testing
    • Started adding some type hints to methods
    • Fixed lots of warnings raised by prospector when running prospector on itself...
    • Removed some old python2 compatibility code which is no longer needed now python2 is not supported at all
    • Fixed hyperlink formatting in this CHANGELOG to be RST (was never updated after converting from markdown)
    Source code(tar.gz)
    Source code(zip)
  • 1.6.0(Jan 17, 2022)

    • #478 Fixed incompatible version specification of pylint-plugin-utils. This now requires pylint-django of at least 2.5.

    note This release drops support for python 3.6.1

    Source code(tar.gz)
    Source code(zip)
  • 1.5.3.1(Dec 8, 2021)

  • 1.5.3(Dec 5, 2021)

  • 1.5.3dev0(Nov 30, 2021)

    This is a development release to help check that the fix for #465 works.

    It just fixes compatibility with pylint>2.12

    Full Changelog: https://github.com/PyCQA/prospector/compare/1.5.2...1.5.3dev0

    Source code(tar.gz)
    Source code(zip)
  • 1.5.2(Nov 30, 2021)

  • 1.5.0.1(Aug 29, 2021)

  • 1.5.0-dev2(Aug 28, 2021)

  • 1.5.0-dev1(Aug 28, 2021)

  • 1.4.1.1(Aug 28, 2021)

  • 1.4.1(Aug 27, 2021)

  • 1.4.0(Aug 26, 2021)

  • 1.3.1(Oct 21, 2020)

    • https://github.com/PyCQA/prospector/pull/390 Updating Vulture API usage for newer versions of Vulture
    • https://github.com/PyCQA/prospector/pull/394 Update pylint and pylint-django
    Source code(tar.gz)
    Source code(zip)
  • 1.3.1.dev1(Aug 22, 2020)

  • 1.3.1.dev0(Aug 22, 2020)

    • https://github.com/PyCQA/prospector/pull/394 Update pylint and pylint-django
    • https://github.com/PyCQA/prospector/pull/392 DOC update
    • https://github.com/PyCQA/prospector/pull/390 Updating Vulture API usage for newer versions of Vulture
    Source code(tar.gz)
    Source code(zip)
  • 1.3.0(Jul 1, 2020)

    • Update pylint support to 2.5.2
    • Update pylint-django to 2.0.15
    • Update pyflakes support to 2.2.0
    • Update pycodestyle support to 2.6.0
    • Update pep8-naming support to 0.10.0
    • Update pyflakes to <2.3.0 and >=2.2.0
    • Update pycodestyle to <2.7.0 and >=2.6.0
    • Update vulture to 1.5
    • Drop Python 2 support
    • Add output-target field when merging profiles
    • Add support for [pycodestyle] external config section
    • Fix AttributeExceptionError being raised when ignore_paths is an integer
    • Use black on entire project
    • Add new pylint option: use_pylint_default_path_finder to make sure there's an option to preserve pylint default behavior.
    • Update pyflakes error code list to the recent version
    Source code(tar.gz)
    Source code(zip)
  • 1.3.0.dev6(Jun 28, 2020)

  • 1.3.0.dev5(Jun 20, 2020)

    • Update pylint support to 2.5.2
    • Update pylint-django to 2.0.15
    • Update pyflakes support to 2.2.0
    • Update pycodestyle support to 2.6.0
    • Update pep8-naming support to 0.10.0
    • Update pyflakes to <2.3.0 and >=2.2.0
    • Update pycodestyle to <2.7.0 and >=2.6.0
    • Update vulture to 1.5
    • Drop Python 2 support
    • #378 Add output-target field when merging profiles
    • #369 Add support for [pycodestyle] external config section
    • Fix AttributeExceptionError being raised when ignore_paths is an integer
    • Use black on entire project
    Source code(tar.gz)
    Source code(zip)
  • 1.2.0(Dec 14, 2019)

Owner
Python Code Quality Authority
Organization for code quality tools (and plugins) for the Python programming language
Python Code Quality Authority
Performant type-checking for python.

Pyre is a performant type checker for Python compliant with PEP 484. Pyre can analyze codebases with millions of lines of code incrementally – providi

Facebook 5.8k Apr 5, 2022
A system for Python that generates static type annotations by collecting runtime types

MonkeyType MonkeyType collects runtime types of function arguments and return values, and can automatically generate stub files or even add draft type

Instagram 3.7k Apr 5, 2022
A static type analyzer for Python code

pytype - ? ✔ Pytype checks and infers types for your Python code - without requiring type annotations. Pytype can: Lint plain Python code, flagging c

Google 3.7k Apr 5, 2022
Static type checker for Python

Static type checker for Python Speed Pyright is a fast type checker meant for large Python source bases. It can run in a “watch” mode and performs fas

Microsoft 7.8k Apr 4, 2022
Unbearably fast O(1) runtime type-checking in pure Python.

Look for the bare necessities, the simple bare necessities. Forget about your worries and your strife. — The Jungle Book.

null 1.1k Apr 4, 2022
Run-time type checker for Python

This library provides run-time type checking for functions defined with PEP 484 argument (and return) type annotations. Four principal ways to do type

Alex Grönholm 817 Apr 2, 2022
coala provides a unified command-line interface for linting and fixing all your code, regardless of the programming languages you use.

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." ― John F. Woods coala provides a

coala development group 3.3k Apr 2, 2022
A formatter for Python files

YAPF Introduction Most of the current formatters for Python --- e.g., autopep8, and pep8ify --- are made to remove lint errors from code. This has som

Google 12.5k Apr 7, 2022
This is a Python program to get the source lines of code (SLOC) count for a given GitHub repository.

This is a Python program to get the source lines of code (SLOC) count for a given GitHub repository.

Nipuna Weerasekara 2 Mar 10, 2022
🦔 PostHog is developer-friendly, open-source product analytics.

PostHog provides open-source product analytics, built for developers. Automate the collection of every event on your website or app, with no need to send data to 3rd parties. With just 1 click you can deploy on your own infrastructure, having full API/SQL access to the underlying data.

PostHog 7.5k Apr 8, 2022
Guesslang detects the programming language of a given source code

Detect the programming language of a source code

Y. SOMDA 532 Apr 1, 2022
Learning source code review, spot vulnerability, find some ways how to fix it.

Learn Source Code Review Learning source code review, spot vulnerability, find some ways how to fix it. WordPress Plugin Authenticated Stored XSS on C

Shan 11 Sep 1, 2021
pycallgraph is a Python module that creates call graphs for Python programs.

Project Abandoned Many apologies. I've stopped maintaining this project due to personal time constraints. Blog post with more information. I'm happy t

gak 1.6k Apr 5, 2022
Turn your Python and Javascript code into DOT flowcharts

Notes from 2017 This is an older project which I am no longer working on. It was built before ES6 existed and before Python 3 had much usage. While it

Scott Rogowski 2.4k Apr 5, 2022
The strictest and most opinionated python linter ever!

wemake-python-styleguide Welcome to the strictest and most opinionated python linter ever. wemake-python-styleguide is actually a flake8 plugin with s

wemake.services 1.8k Apr 4, 2022
Optional static typing for Python 3 and 2 (PEP 484)

Mypy: Optional Static Typing for Python Got a question? Join us on Gitter! We don't have a mailing list; but we are always happy to answer questions o

Python 12.9k Apr 9, 2022
Python package to parse and generate C/C++ code as context aware preprocessor.

Devana Devana is a python tool that make it easy to parsing, format, transform and generate C++ (or C) code. This tool uses libclang to parse the code

null 5 Apr 3, 2022
fixup: Automatically add and remove python import statements

fixup: Automatically add and remove python import statements The goal is that running fixup my_file.py will automatically add or remove import stateme

null 2 Feb 1, 2022
Find dead Python code

Vulture - Find dead code Vulture finds unused code in Python programs. This is useful for cleaning up and finding errors in large code bases. If you r

Jendrik Seipp 2.1k Apr 9, 2022