pax_global_header00006660000000000000000000000064152261175170014521gustar00rootroot0000000000000052 comment=051d8abf6401a5dd4f4f01922ac569a48a4ab45c prospector-dev-prospector-307b697/000077500000000000000000000000001522611751700171565ustar00rootroot00000000000000prospector-dev-prospector-307b697/.coveragerc000066400000000000000000000000311522611751700212710ustar00rootroot00000000000000 [run] source=prospector prospector-dev-prospector-307b697/.github/000077500000000000000000000000001522611751700205165ustar00rootroot00000000000000prospector-dev-prospector-307b697/.github/ISSUE_TEMPLATE/000077500000000000000000000000001522611751700227015ustar00rootroot00000000000000prospector-dev-prospector-307b697/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000014441522611751700253760ustar00rootroot00000000000000--- name: Bug report about: Create a report to help us improve title: "[BUG]" labels: investigate assignees: "" --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Call prospector the following way '....' 3. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Environment (please complete the following information):** - OS: [e.g. macOS] - Tool [e.g. pylint] - Prospector version [e.g. 1.1.7] - Python version [e.g. 3.6.8] **Additional context** Add any other context about the problem here. Putting the list of dependencies installed, e.g. the output of `pip freeze` also helps. prospector-dev-prospector-307b697/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000011541522611751700264270ustar00rootroot00000000000000--- name: Feature request about: Suggest an idea for this project title: "[FEATURE REQUEST]" labels: enhancement assignees: "" --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here. prospector-dev-prospector-307b697/.github/PULL_REQUEST_TEMPLATE.md000066400000000000000000000032521522611751700243210ustar00rootroot00000000000000 ## Description ## Related Issue ## Motivation and Context ## How Has This Been Tested? ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] My change requires a change to the dependencies - [ ] I have updated the dependencies accordingly - [ ] I have read the **CONTRIBUTING** document. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. prospector-dev-prospector-307b697/.github/SECURITY.md000066400000000000000000000000731522611751700223070ustar00rootroot00000000000000Coordinated Disclosure Plan: https://tidelift.com/security prospector-dev-prospector-307b697/.github/dependabot.yml000066400000000000000000000011021522611751700233400ustar00rootroot00000000000000# Keep GitHub Actions up to date with GitHub's Dependabot... # https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem version: 2 updates: - package-ecosystem: github-actions directory: / groups: github-actions: patterns: - "*" # Group all Actions updates into a single larger pull request schedule: interval: weekly prospector-dev-prospector-307b697/.github/workflows/000077500000000000000000000000001522611751700225535ustar00rootroot00000000000000prospector-dev-prospector-307b697/.github/workflows/codeql-analysis.yml000066400000000000000000000046701522611751700263750ustar00rootroot00000000000000# For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. # # ******** NOTE ******** # We have attempted to detect the languages in your repository. Please check # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # name: "CodeQL" on: push: branches: [main] pull_request: # The branches below must be a subset of the branches above branches: [main] schedule: - cron: "44 16 * * 4" jobs: analyze: name: Analyze runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write strategy: fail-fast: false matrix: language: ["python"] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed steps: - name: Checkout repository uses: actions/checkout@v7 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v4 # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines # and modify them (or add more) to build your code if your project # uses a compiled language #- run: | # make bootstrap # make release - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 prospector-dev-prospector-307b697/.github/workflows/pre-commit.yaml000066400000000000000000000012561522611751700255170ustar00rootroot00000000000000name: pre-commit on: push: branches: - master pull_request: branches: - master jobs: pre-commit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: actions/setup-python@v6.3.0 - run: pip install poetry - run: poetry install --all-extras --all-groups - uses: actions/cache@v6 with: path: ~/.cache/pre-commit key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} restore-keys: |- pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} pre-commit- - name: Check pre-commit run: poetry run pre-commit run prospector --all-files prospector-dev-prospector-307b697/.github/workflows/release.yml000066400000000000000000000017471522611751700247270ustar00rootroot00000000000000name: Release on: release: types: - published env: DEFAULT_PYTHON: 3.12 jobs: release-pypi: name: Upload release to PyPI runs-on: ubuntu-latest steps: - name: Check out code from Github uses: actions/checkout@v7 - name: Set up Python ${{ env.DEFAULT_PYTHON }} id: python uses: actions/setup-python@v6.3.0 with: python-version: ${{ env.DEFAULT_PYTHON }} - name: Install requirements run: | python -m pip install --disable-pip-version-check -U pip twine poetry "poetry-core" - name: Build distributions run: | poetry build -f wheel poetry build -f sdist - name: Upload to PyPI if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags') env: TWINE_REPOSITORY: pypi TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} run: | twine upload --verbose dist/* prospector-dev-prospector-307b697/.github/workflows/tests.yml000066400000000000000000000026011522611751700244370ustar00rootroot00000000000000name: tests on: push: branches: - master pull_request: branches: - master jobs: tests: runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v7 - uses: actions/setup-python@v6.3.0 with: python-version: ${{ matrix.python-version }} - run: pip install poetry - run: poetry install --all-extras --all-groups # - run: poetry show --all # - run: poetry show --outdated # - run: poetry show --tree - name: Install test profile used in the tests run: poetry run pip install tests/prospector-profile-test/ - run: poetry run pytest --benchmark-disable --cov --cov-report= tests/ - name: Run Prospector checks run: poetry run prospector --output=pylint - name: Check that Prospector can run run: | echo "Checking prospector can run; don't care about messages found, only that it runs successfully" poetry run prospector --quiet --zero-exit echo "Prospector ran successfully." - name: Check packaging run: | echo "Building packages" rm -rf dist/ poetry build echo "Validating packages" poetry run twine check dist/* echo "Packages build and valdiate successfully." prospector-dev-prospector-307b697/.gitignore000066400000000000000000000012431522611751700211460ustar00rootroot00000000000000*.py[cod] # C extensions *.so # Packages *.egg *.egg-info dist build eggs parts var sdist develop-eggs .installed.cfg # Installer logs pip-log.txt # Unit test / coverage reports .coverage .tox nosetests.xml .noseids .benchmarks # Translations *.mo # Mr Developer .mr.developer.cfg .project .pydevproject .idea .vscode .vscode-server .devcontainer.json .vs-liveshare-keychain .local .gitconfig .cache .bash_history # Sphinx docs/_build docs/html # testing/linting .mypy_cache .pytest_cache # emacs TAGS flycheck* # local configuration .python-version .env .venv* env.txt venv # Pylint .pylint.d pip-wheel-metadata # local testing for now .drone.* TODO.txt *.swp prospector-dev-prospector-307b697/.pre-commit-config.yaml000066400000000000000000000033251522611751700234420ustar00rootroot00000000000000ci: skip: - prospector repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: mixed-line-ending args: [--fix=lf] - id: debug-statements - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.15.21 hooks: - id: ruff-format - id: ruff args: - --fix - --ignore=E501 exclude: | (?x)^( |tests/.* )$ - repo: https://github.com/codespell-project/codespell rev: v2.4.2 hooks: - id: codespell args: - --ignore-words-list=nin,astroid - --skip=poetry.lock - repo: https://github.com/regebro/pyroma rev: "5.1b1" hooks: - id: pyroma # Must be specified because of the default value in pyroma always_run: false additional_dependencies: - poetry files: | (?x)^( README.rst| pyproject.toml| )$ - repo: local hooks: - id: prospector name: prospector description: Analyze Python code using Prospector entry: prospector language: python types: [python] require_serial: true verbose: true additional_dependencies: # the following are needed to run mypy. - types-PyYAML exclude: |- (?x)^( tests/.*/testdata/.* |tests/tools/.*/testpath/.* |tests/tools/pylint/pylint_configs/.* |tests/tools/pylint/test_no_init_found/.* |tests/is_python/scrypt.* |docs/conf\.py )$ prospector-dev-prospector-307b697/.pre-commit-hooks.yaml000066400000000000000000000002501522611751700233120ustar00rootroot00000000000000- id: prospector name: prospector description: Analyze Python code using Prospector entry: prospector language: python types: [python] require_serial: true prospector-dev-prospector-307b697/.prospector.yml000066400000000000000000000031131522611751700221550ustar00rootroot00000000000000output-format: grouped # strictness: veryhigh # doc-warnings: no test-warnings: yes max-line-length: 120 # pep8: full ignore-patterns: - tests/.*/testdata/.* - tests/tools/.*/testpath/.* - tests/tools/pylint/pylint_configs/.* - tests/tools/pylint/test_no_init_found/.* - tests/is_python/scrypt.* - docs/conf\.py - tests/prospector-profile-test/build/.* mypy: run: true options: ignore-missing-imports: true follow-imports: skip check-untyped-defs: true disallow-any-generics: true disallow-untyped-defs: true disallow-incomplete-defs: true disallow-untyped-decorators: true warn-unused-configs: true warn-unused-ignores: true warn-redundant-casts: true extra-checks: true pylint: options: extension-pkg-allow-list: mypy disable: - too-few-public-methods - missing-docstring - star-args - consider-using-f-string - too-many-locals # TODO: clean up these complexity problems - too-many-branches - too-many-arguments - too-many-instance-attributes - too-many-function-args - too-many-statements - too-many-positional-arguments - no-else-return mccabe: run: false pycodestyle: disable: - E126 - E501 # line too long pydocstyle: run: false disable: - D100 - D101 - D102 - D103 - D107 - D205 - D400 - D401 bandit: run: true disable: - B101 # Use of assert detected. ruff: run: true options: fix: true disable: - E501 # line too long - S101 # Use of assert detected - SIM105 # suppressible-exception (slow code) prospector-dev-prospector-307b697/.readthedocs.yaml000066400000000000000000000003731522611751700224100ustar00rootroot00000000000000version: 2 build: os: ubuntu-22.04 tools: python: "3.11" sphinx: configuration: docs/conf.py python: install: - requirements: docs/requirements.txt - method: pip path: . extra_requirements: - with_everything prospector-dev-prospector-307b697/CHANGELOG.rst000066400000000000000000001245421522611751700212070ustar00rootroot00000000000000######### Changelog ######### Version 1.12.0 -------------- **New**: * pylint version will now be above 3.0.0 again Version 1.11.0 -------------- **New**: * We dropped support for python 3.7. * prospector now support python 3.12 and 3.13. * pylint is now set to version 3.0.0 or less, while waiting for a new release of ``requirements-detector`` compatible with pylint 3.0+. Version 1.10.3 -------------- **New**: * Dependencies versions were bumped following multiple moderate CVE declared in transitive dependencies. Version 1.10.1 and 1.10.2 ------------------------- **Bugfixes**: 1.10.1 was released to fix a packaging and installation problem (see `this issue `_ 1.10.2 fixes both issues Version 1.10.0 -------------- **New**: * Prospector profiles can now be loaded from external packages, meaning that behaviour can be packaged and reused across projects - `#604 `_ * Added pyright as an optional additional tool - `#612 `_ * `use-dmypy` option now passed through to MyPy `#611 `_ Version 1.9.0 ------------- * https://github.com/PyCQA/prospector/pull/577 * https://github.com/PyCQA/prospector/pull/580 * https://github.com/PyCQA/prospector/pull/592 Version 1.8.4 ------------- * https://github.com/PyCQA/prospector/issues/566 * https://github.com/PyCQA/prospector/issues/575 * https://github.com/PyCQA/prospector/issues/578 Version 1.8.3 ------------- * `#560 `_ * `#559 `_ * `#555 `_ * `#554 `_ * `#552 `_ * `#551 `_ Version 1.8.2 ------------- * `#547 `_ Version 1.8.1 ------------- Let's test faster. **Add support for Python 3.11**: Python 3.11 is between 10-60% faster than Python 3.10. Version 1.8.0 ------------- **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 behavior 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 `_ * Running prospector on a path not in the CWD (eg, 'prospector /some/where/else') will not cause exceptions, and will instead use absolute paths for message output * Autodetction of libraries, to automatically use pylint plugins, will no work on projects using a pyproject.toml ; also it has been turned on by default, it seemed to have accidentally been set to off by default some time ago. * `#529 `_ **Misc**: * Prospector now runs on itself without generating errors after all linting warnings were fixed Version 1.7.6 ------------- 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. Version 1.7.5 ------------- 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 Version 1.7.4 ------------- Mea culpa release **Fix** The effort to allow pylint configuration in ``pyproject.toml`` to be used as an external config source (`issue here `_) 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 `_. Version 1.7.3 ------------- 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 (comment) `_ * 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 `_ Version 1.7.2 ------------- 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 `_ Version 1.7.1 ------------- Lots of smaller bugfixes. **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 `_ Version 1.7.0 ------------- This is mostly a "tidying up" release but some things have changed which may cause differences to output, hence the bump of the major version. **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 `_ **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 internals** These are all internal prospector code quality improvements. Ideally, they should not be noticed by anybody as they are internal refactorings. * `#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) * Replaced `os.path` with `pathlib.Path` everywhere in prospector internals, to improve and simplify finding files to inspect. Theoretically this behaves in the same way as far as the user will see (please open a ticket if you notice anything obviously different) Version 1.6.1 ------------- - Update pyflakes to 2.* `#454 `_ Version 1.6.0 ------------- - Fixed incompatible version specification of pylint-plugin-utils. This now requires pylint-django of at least 2.5. `#478 `_ *note* This release drops support for python ``3.6.1`` Version 1.5.3 and 1.5.3dev0 and 1.5.3.1 --------------------------------------- - `#465 `_ Remove unnecessary configuration reset to fix pylint>=2.12 compatibility - Version 1.5.3.1 was needed to unpin the pylint dependency to actually use the fix for compatibility. Version 1.5.2 ------------- - `#465 `_ Bugfix release to pin pylint<2.12 because prospector's internals were not compatible with it Version 1.5.1 ------------- - `#438 `_ Promoting pre-release to release as it appears to work Version 1.5.0.1 --------------- - `#433 `_ Attempted fix of flake8 dependency versioning conflict Version 1.5.0 ------------- - `#436 `_ Swapped out packaging to use poetry instead of setup.py and setuptools Version 1.4.1 ------------- - `#373 `_ Permits to raise pylint's useless-suppression - `#414 `_ Loosen pycodestyle requirement - `#408 `_ Fix filenames if they are PosixPath - `#412 `_ Fix unclosed file warning - `#399 `_ Fix fatal error on running mypy when duplicate module names Version 1.4.0 ------------- - `#424 `_ GitHub Action to discover typos with codespell - `#421 `_ Loosen pylint requirement - `#427 `_ Fix prospector for latest pylint version and add Github actions Version 1.3.1 ------------- - `#390 `_ Updating Vulture API usage for newer versions of Vulture - `#394 `_ Update pylint and pylint-django Version 1.3.0 ------------- - 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 Version 1.2.0 ------------- - Drop Python 3.4 support - `#308 `_ Update pyflakes support to < 2.1.0 - `#324 `_ Add bandit support - `#344 `_ Ignore __pycache__ and node_modules - `#349 `_ and `#355 `_ Fix compatibility issues with mypy >= 0.730 - `#356 `_ Add support for Python 3.8 Version 1.1.7 ------------- - `#299 `_ Output path tests and abspaths for windows - `#300 `_ Fix `check_paths` definition for pep8tool - `#318 `_ Add support pylint --load-plugins option in profile - `#336 `_ Pylint fix for message definitions usage - `#340 `_ Bump pylint django - `#343 `_ Support more kinds of mypy messages - `@5ea0e95 `_ Pin astroid to 2.2.5 Version 1.1.6.4 --------------- - `#333 `_ Hotfix for pylint module run - `#309 `_ Remove the pylint locally-enabled message suppression Version 1.1.6.2 --------------- - `#304 `_ Pin pylint to 2.1.1 for now as prospector is not compatible with 2.2.0 - `#302 `_ Pin astroid to 2.0.4 as pylint-django and pylint-flask need fixes to be compatible with newer versions Version 1.1.6.1 --------------- - `#292 `_ Adding pylint plugin dependencies back and fixing autodetect behaviour. - (note: .1 added as 1.1.6 upload to PyPI was broken) Version 1.1.5 ------------- - `#283 `_ Remove unexpected argument from read_config_file - Remove quiet argument - `#291 `_ Update pycodestyle support until 2.4.0 - `#280 `_ Add strict option and fixed emacs output format for mypy tool - `#282 `_ Fix working dir detection Version 1.1.4 --------------- - `#285 `_ Fix dependency tree resolution - now insists on `pep8-naming<=0.4.1` as later versions cause conflicting versions of flake8 to be installed. Version 1.1.3 --------------- - `#279 `_ Fix --show-profile crash Version 1.1.2 --------------- - `#276 `_ Updating required Pyroma version and removing some warnings which were removed from Pyroma - thanks `@volans- `_ for PR `#277 `_ Version 1.1.1 --------------- - Removing `pylint-common `_ as a direct dependency as it does not add a lot of utility and is not kept up to date as much as other plugins Version 1.1 --------------- - `#267 `_ Fix read_config_file using quiet keyword with older pylint versions - `#262 `_ Bugfix report different behavior based on path(includes KeyError on FORMATTERS fix) Version 1.0 --------------- - `#228 `_ Add mypy support - `#249 `_ Add option to point to pylintrc inside prospector configuration file - `#250 `_ Add option to redirect prospector output to files - `#261 `_ Drop Python 3.3 support - `#261 `_ Use Pylint >= 2 for Python 3 Version 0.12.11 --------------- - `#256 `_ Match relative paths that giving different results when using `--absolute-paths` flag - Pin vulture version < 0.25 Version 0.12.10 --------------- - Force pyroma >= 2.3 - `#236 `_ Fix typo and update URLs in docs Version 0.12.9 --------------- - `#237 `_ Load pylint plugins before pylint config - `#253 `_ Relaxing pyroma constraint - `#229 `_ prospector crashes on startup if a recent pyroma is installed Version 0.12.8 --------------- * Enforce pylint, pyflakes and pycodestyle versions to avoid breaking other dependent tools * `#242 `_ Fix absolute path issue with pylint * `#234 `_ Added Python 3.5/3.6 support on build Version 0.12.7 --------------- * Enforcing pydocstyle >= 2.0.0 for API compatibility reliability Version 0.12.6 --------------- * `#210 `_ `#212 `_ Removing debug output accidentally left in (@souliane) * `#211 `_ Added VSCode extension to docs (@DonJayamanne) * `#215 `_ Support `pydocstyle>=2.0` (@samspillaz) * `#217 `_ Updating links to supported tools in docs (@mbeacom) * `#219 `_ Added a `__main__.py` to allow calling `python -m prospector` (@cprogrammer1994) Version 0.12.5 --------------- * `#207 `_ Fixed missing 'UnknownMessage' exception caused by recent pylint submodule changes * Minor documentation formatting updates * `#202 `_ Ignoring .tox directories to avoid accidentally checking the code in there * `#205 `_ Fixes for compatibility with pylint 1.7+ * `#193 `_ Fixes for compatibility with pylint 1.6+ * `#194 `_ Fixes for compatibility with vulture 0.9+ * `#191 `_ Fixes for compatibility with pydocstyle 1.1+ Version 0.12.4 --------------- * Panicky stapling of pyroma dependency until prospector is fixed to not break with the new pyroma release Version 0.12.3 --------------- * `#190 `_ Pinning pydocstyle version for now until API compatibility with newer versions can be written * `#184 `_ Including the LICENCE file when building dists * Fixed a crash in the profile_validator tool if an empty profile was found * (Version 0.12.2 does not exist due to a counting error...) Version 0.12.1 --------------- * `#178 `_ Long paths no longer cause crash in Windows. * `#173 `_ Changed from using pep8 to pycodestyle (which is what pep8 was renamed to) * `#172 `_ Fixed non-ascii file handling for mccabe tool and simplified all python source file reading Version 0.12 --------------- * `#170 `_ Changed from using pep257 to pydocstyle (which is what pep257 is now called) * `#162 `_ Properly warning about optional tools which are not installed * `#166 `_ Added vscode formatter * `#153 `_ Better pep257 support * `#156 `_ Better pyroma logging hack for when pyroma is not installed * `#158 `_ Fixed max-line-length command line option Version 0.11.7 --------------- * Wrapping all tools so that none can directly write to stdout/stderr, as this breaks the output format for things like json. Instead, it is captured and optionally included as a regular message. Version 0.11.6 --------------- * Yet more 'dodgy' encoding problem avoidance Version 0.11.5 --------------- * Including forgotten 'python-targets' value in profile serialization Version 0.11.4 --------------- * Prevented 'dodgy' tool from trying to analyse compressed text data Version 0.11.3 --------------- * Fixed encoding of file contents handling by tool "dodgy" under Python3 Version 0.11.2 --------------- * Fixed a file encoding detection issue when running under Python3 * If a pylint plugin is specified in a .pylintrc file which cannot be loaded, prospector will now carry on with a warning rather than simply crash Version 0.11.1 --------------- * `#147 `_ Fixed crash when trying to load pylint configuration files in pylint 1.5 Version 0.11 --------------- * Compatibility fixes to work with pylint>=1.5 * McCabe tool now reports correct line and character number for syntax errors (and therefore gets blended if pylint etc detects such an error) * Autodetect of libraries will now not search inside virtualenvironments * `#142 `_ better installation documentation in README (thanks `@ExcaliburZero `_) * `#141 `_ profile-validator no longer complains about member-warnings (thanks `@alefteris `_) * `#140 `_ emacs formatter includes character position (thanks `@philroberts `_) * `#138 `_ docs fixed for 'output-format' profile option (thanks `@faulkner `_) * `#137 `_ fixed various formatting issues in docs (thanks `@danstender `_) * `#132 `_ Added support for custom flask linting thanks to the awesome [pylint-flask](https://github.com/jschaf/pylint-flask) plugin by [jschaf](https://github.com/jschaf) * `#131 `_, `#134 `_ Custom pylint plugins are now loaded from existing .pylintrc files if present (thanks `@kaidokert `_ and `@antoviaque `_) Version 0.10.2 --------------- * Added information to summary to explain what external configuration was used (if any) to configure the underlying tools * Fixed supression-token search to use (or at least guess) correct file encoding Version 0.10.1 --------------- * `#116 `_ Comparison failed between messages with numeric values for character and those with a `None` value (thanks @smspillaz) * `#118 `_ Unified output of formatters to have correct output of str rather than bytes (thanks @prophile) * `#115 `_ Removed argparse as an explicit dependency as only Python 2.7+ is supported now Version 0.10 --------------- * `#112 `_ Profiles will now also be autoloaded from directories named `.prospector`. * `#32 `_ and `#108 `_ Added a new 'xunit' output formatter for tools and services which integrate with this format (thanks to [lfrodrigues](https://github.com/lfrodrigues)) * Added a new built-in profile called 'flake8' for people who want to mimic the behaviour of 'flake8' using prospector. Version 0.9.10 --------------- * The profile validator would load any file whose name was a subset of '.prospector.yaml' due to using the incorrect comparison operator. * Fixing a crash when using an empty `ignore-patterns` list in a profile. * Fixing a crash when a profile is not valid YAML at all. * `#105 `_ pyflakes was not correctly ignoring errors. Version 0.9.9 --------------- * pep8.py 1.6.0 added new messages, which are now in prospector's built-in profiles Version 0.9.8 --------------- * Fixing a crash when using pep8 1.6.0 due to the pep8 tool renaming something that Prospector uses Version 0.9.7 --------------- * `#104 `_ The previous attempt at normalising bytestrings and unicode in Python 2 was clumsily done and a bit broken. It is hopefully now using the correct voodoo incantations to get characters from one place to another. * The blender combinations were not updated to use the new PyFlakes error codes; this is now fixed. Version 0.9.6 --------------- * The profile validator tool was always outputting absolute paths in messages. This is now fixed. * The "# NOQA" checking was using absolute paths incorrectly, which meant the message locations (with relative paths) did not match up and no messages were suppressed. Version 0.9.5 --------------- * Fixed a problem with profile serialising where it was using the incorrect dict value for strictness Version 0.9.4 --------------- * The previous PEP257 hack was not compatible with older versions of pep257. Version 0.9.3 --------------- * The PEP257 tool sets a logging level of DEBUG globally when imported as of version 0.4.1, and this causes huge amounts of tokenzing debug to be output. Prospector now has a hacky workaround until that is fixed. * Extra profile information (mainly the shorthand information) is kept when parsing and serializing profiles. Version 0.9.2 --------------- * There were some problems related to absolute paths when loading profiles that were not in the current working directory. Version 0.9.1 --------------- * Mandating version 0.2.3 of pylint-plugin-utils, as the earlier ones don't work with the add_message API changes made in pylint 1.4+ Version 0.9 --------------- * `#102 `_ By default, prospector will hide pylint's "no-member" warnings, because more often than not they are simply incorrect. They can be re-enabled with the '--member-warnings' command line flag or the 'member-warnings: true' profile option. * `#101 `_ Code annotated with pep8/flake8 style "# noqa" comments is now understood by prospector and will lead to messages from other tools being suppressed too. * `#100 `_ Pyflakes error codes have been replaced with the same as those used in flake8, for consistency. Profiles with the old values will still work, and the profile-validator will warn you to upgrade. * Messages now use Pylint error symbols ('star-args') instead of codes ('W0142'). This makes it much more obvious what each message means and what is happening when errors are suppressed or ignored in profiles. The old error codes will continue to work in profiles. * The way that profiles are handled and parsed has completely been rewritten to avoid several bugs and introduce 'shorthand' options to profiles. This allows profiles to specify simple options like 'doc-warnings: true' inside profiles and configure anything that can be configured as a command line argument. Profiles can now use options like 'strictness: high' or 'doc-warnings: true' as a shortcut for inheriting the built-in prospector profiles. * A new `--show-profile` option is available to dump the calculated profile, which is helpful for figuring out what prospector thinks it is doing. * Profiles now have separate `ignore-paths` and `ignore-patterns` directives to match the command line arguments. The old `ignore` directive remains in place for backwards compatibility and will be deprecated in the future. * A new tool, `profile-validator`, has been added. It simply checks prospector profiles and validates the settings, providing warnings if any are incorrect. * `#89 `_ and `#40 `_ - profile merging was not behaving exactly as intended, with later profiles not overriding earlier profiles. This is now fixed as part of the aforementioned rewrite. * pep257 is now included by default; however it will not run unless the '--doc-warnings' flag is used. * pep257 messages are now properly blended with other tools' documentation warnings * Path and output character encoding is now handled much better (which is to say, it is handled; previously it wasn't at all). Version 0.8.3 --------------- * `#96 `_ and `#97 `_ - disabling messages in profiles now works for pep8 Version 0.8.2 --------------- * Version loading in setup.py no longer imports the prospector module (which could lead to various weirdnesses when installing on different platforms) * `#82 `_ resolves regression in adapter library detection raising, ``ValueError: too many values to unpack``. provided by `@jquast `_ * `#83 `_ resolves regression when adapter library detects django, ``TypeError: '_sre.SRE_Pattern' object is not iterable``. provided by `@jquast `_ Version 0.8.1 --------------- * Strictness now also changes which pep257 messages are output * pep257 and vulture messages are now combined and 'blended' with other tools * `#80 `_ Fix for Python3 issue when detecting libraries, provided by `@smspillaz `_ Version 0.8 --------------- * Demoted frosted to be an optional tool - this is because development seems to have slowed and pyflakes has picked up again, and frosted how has several issues which are solved by pyflakes and is no longer a useful addition. * `#78 `_ Prospector can now take multiple files as a path argument, thus providing errors for several files at a time. This helps when integrating with IDEs, for example. * Upgrading to newer versions of Pylint and related dependencies resolves `#73 `_, `#75 `_, `#76 `_ and `#79 `_ * `#74 `_, `#10 `_ Tools will now use any configuration specific to them by default. That is to say, if a `.pylintrc` file exists, then that will be used in preference to prospector's own opinions of how to use pylint. * Added centralised configuration management, with an abstraction away from how prospector and each tool is actually configured. * Removed the "adaptors" concept. This was a sort of visitor pattern in which each tool's configuration could be updated by an adaptor, which 'visited' the tool to tweak settings based on what the adaptor represented. In practise this was not useful and a confusing way to tweak behaviour - tools now configure themselves based on configuration options directly. * Changed the default output format to be 'grouped' rather than 'text' * Support for Python 2.6 has been dropped, following Pylint's lead. * Using pylint 1.4's 'unsafe' mode, which allows it to load any C extensions (this was the behaviour for 1.3 and below). Not loading them causes many many inference errors. * `#65 `_ Resolve UnicodeDecodeErrors thrown while attempting to auto-discover modules of interest by discovering target python source file encoding (PEP263), and issuing only a warning if it fails (thanks to [Jeff Quast](https://github.com/jquast)). Version 0.7.3 --------------- * Pylint dependency version restricted to 1.3, as 1.4 drops support for Python 2.6. Prospector will drop support for Python 2.6 in a 0.8 release. * File names ending in 'tests.py' will now be ignored if prospector is set to ignore tests (previously, the regular expression only ignored files ending in 'test.py') * `#70 `_ Profiles starting with a `.yml` extension can now be autoloaded * `#62 `_ For human readable output, the summary of messages will now be printed at the end rather than at the start, so the summary will be what users see when running prospector (without piping into `less` etc) Version 0.7.2 --------------- * The E265 error from PEP8 - "Block comment should start with '# '" - has been disabled for anything except veryhigh strictness. Version 0.7.1 --------------- * `#60 `_ Prospector did not work with Python2.6 due to timedelta.total_seconds() not being available. * Restored the behaviour where std_out/std_err from pylint is suppressed Version 0.7 --------------- * `#48 `_ If a folder is detected to be a virtualenvironment, then prospector will not check the files inside. * `#31 `_ Prospector can now check single files if passed a module as the path argument. * `#50 `_ Prospector now uses an exit code of 1 to indicate that messages were found, to make it easier for bash scripts and so on to fail if any messages are found. A new flag, `-0` or `--zero-exit`, turns off this behaviour so that a non-zero exit code indicates that prospector failed to run. * Profiles got an update to make them easier to understand and use. They are mostly the same as before, but `the documentation `_ and command line arguments have improved so that they can be reliably used. * If a directive inline in code disables a pylint message, equivalent messages from other tools will now also be disabled. * Added optional tools - additional tools which are not enabled by default but can be activated if the user chooses to. * Added pyroma, a tool for validating packaging metadata, as an optional tool. * `#29 `_ Added support for pep257, a docstring format checker * `#45 `_ Added vulture, a tool for finding dead code, as an optional tool. * `#24 `_ Added Sphinx documentation, which is now also `available on ReadTheDocs `_ Version 0.6.4 --------------- * Fixed pylint system path munging again again Version 0.6.3 --------------- * Fixed dodgy tool's use of new file finder Version 0.6.2 --------------- * Fixed pylint system path munging again Version 0.6.1 --------------- * Fixed pylint system path munging Version 0.6 --------------- * Module and package finding has been centralised into a `finder.py` module, from which all tools take the list of files to be inspected. This helps unify which files get inspected, as previously there were several times when tools were not correctly ignoring files. * Frosted [cannot handle non-utf-8 encoded files](https://github.com/timothycrosley/frosted/issues/56) so a workaround has been added to simply ignore encoding errors raised by Frosted until the bug is fixed. This was deemed okay as it is very similar to pyflakes in terms of what it finds, and pyflakes does not have this problem. * `#43 `_ - the blender is now smarter, and considers that a message may be part of more than one 'blend'. This means that some messages are no longer duplicated. * `#42 `_ - a few more message pairs were cleaned up, reducing ambiguity and redundancy * `#33 `_ - there is now an output format called `pylint` which mimics the pylint `--parseable` output format, with the slight difference that it includes the name of the tool as well as the code of the message. * `#37 `_ - profiles can now use the extension `.yml` as well as `.yaml` * `#34 `_ - south migrations are ignored if in the new south name of `south_migrations` (ie, this is compatible with the post-Django-1.7 world) Version 0.5.6 / 0.5.5 --------------------- * The pylint path handling was slightly incorrect when multiple python modules were in the same directory and importing from each other, but no `__init__.py` package was present. If modules in such a directory imported from each other, pylint would crash, as the modules would not be in the `sys.path`. Note that 0.5.5 was released but this bugfix was not correctly merged before releasing. 0.5.6 contains this bugfix. Version 0.5.4 --------------- * Fixing a bug in the handling of relative/absolute paths in the McCabe tool Version 0.5.3 --------------- ##### New Features * Python 3.4 is now tested for and supported ##### Bug Fixes * Module-level attributes can now be documented with a string without triggering a "String statement has no effect" warning * `#28 `_ Fixed absolute path bug with Frosted tool Version 0.5.2 --------------- ##### New Features * Support for new error messages introduced in recent versions of `pep8` and `pylint` was included. Version 0.5.1 --------------- ##### New Features * All command line arguments can now also be specified in a `tox.ini` and `setup.cfg` (thanks to [Jason Simeone](https://github.com/jayclassless)) * `--max-line-length` option can be used to override the maximum line length specified by the chosen strictness ##### Bug Fixes * `#17 `_ Prospector generates messages if in a path containing a directory beginning with a `.` - ignore patterns were previously incorrectly being applied to the absolute path rather than the relative path. * `#12 `_ Library support for Django now extends to all tools rather than just pylint * Some additional bugs related to ignore paths were squashed. Version 0.5 --------------- * Files and paths can now be ignored using the `--ignore-paths` and `--ignore-patterns` arguments. * Full PEP8 compliance can be turned on using the `--full-pep8` flag, which overrides the defaults in the strictness profile. * The PEP8 tool will now use existing config if any is found in `.pep8`, `tox.ini`, `setup.cfg` in the path to check, or `~/.config/pep8`. These will override any other configuration specified by Prospector. If none are present, Prospector will fall back on the defaults specified by the strictness. * A new flag, `--external-config`, can be used to tweak how PEP8 treats external config. `only`, the default, means that external configuration will be preferred to Prospector configuration. `merge` means that Prospector will combine external configuration and its own values. `none` means that Prospector will ignore external config. * The `--path` command line argument is no longer required, and Prospector can be called with `prospector path_to_check`. * Pylint version 1.1 is now used. * Prospector will now run under Python3. Version 0.4.1 --------------- * Additional blending of messages - more messages indicating the same problem from different tools are now merged together * Fixed the maximum line length to 160 for medium strictness, 100 for high and 80 for very high. This affects both the pep8 tool and pylint. Version 0.4 --------------- * Added a changelog * Added support for the `dodgy `_ codebase checker * Added support for pep8 (thanks to `Jason Simeone `_) * Added support for pyflakes (thanks to `Jason Simeone `_) * Added support for mccabe (thanks to `Jason Simeone `_) * Replaced Pylint W0312 with a custom checker. This means that warnings are only generated for inconsistent indentation characters, rather than warning if spaces were not used. * Some messages will now be combined if Pylint generates multiple warnings per line for what is the same cause. For example, 'unused import from wildcard import' messages are now combined rather than having one message per unused import from that line. * Messages from multiple tools will be merged if they represent the same problem. * Tool failure no longer kills the Prospector process but adds a message instead. * Tools can be enabled or disabled from profiles. * All style warnings can be suppressed using the ``--no-style-warnings`` command line switch. * Uses a newer version of `pylint-django `_ for improved analysis of Django-based code. prospector-dev-prospector-307b697/CONTRIBUTING.rst000066400000000000000000000031361522611751700216220ustar00rootroot00000000000000Development and Contributing ============================ All contributions are very welcome! You can contribute in many ways: * Join the `python code quality`_ mailing list and answer questions. * Report bugs on the GitHub `issue tracker`_. * Submit pull requests on the GitHub `repository`_. Ideally make a pull request to the *develop* branch, as I prefer to keep the master branch the same as the most recent release on PyPI. If you do this, be sure to add yourself to the CONTRIBUTORS.rst file too! .. _python code quality: https://mail.python.org/mailman/listinfo/code-quality .. _issue tracker: https://github.com/PyCQA/prospector/issues .. _repository: https://github.com/PyCQA/prospector Code Quality ------------ As a code quality testing tool, it makes sense to strive to be a good example of good code! To that end, prospector is checked by `Landscape _` and ideally when making a pull request, please take note of any decreases in quality. Additionally, there is a `pre-commit `_ configuration to prevent various small problems before they are committed. Check the site for more information but the short version is:: pip install pre-commit pre-commit install Tests ----- There are not a huge number of tests right now, as most of the code in Prospector is handling the output of other tools. However, please do run them before submitting a pull request:: pytest Prospector targets Python 3.6, 3.7, 3.8 and 3.9. You can use `tox`_ to test this locally, and all tests are run with Github Actions. .. _tox: https://tox.readthedocs.io/en/latest/ prospector-dev-prospector-307b697/CONTRIBUTORS.rst000066400000000000000000000043521522611751700216510ustar00rootroot00000000000000Contributors ------------ * Abdullah Hilson (`@abumalick `_) * Adam Hodges (`@ajhodges `_) * Amir Rachum (`@Nurdok `_) * Angel Blasco (`@alblasco `_) * Anthony Ricaud (`@rik `_) * Bram (`@Psycojoker `_) * Bryce Guinta (`@brycepg `_) * Carl Crowder (`@carlio `_) * Carlos CoÃĒlho (`@chocoelho `_) * Carlos Cruz (`@ccruz09 `_) * Claudiu Popa (`@PCManticore `_) * D Morgan (`@morgangraphics `_) * David J Pugh (`@djpugh `_) * Eric Brown (`@ericwb `_) * Florian Bruhin (`@The-Compiler `_) * Ian Lee (`@IanLee1521 `_) * Ian Stapleton Cordasco (`@sigmavirus24 `_) * iderr (`@IDerr `_) * Joa Cortez (`@joacortez `_) * Joe Wallis (`@Peilonrayz `_) * Jon Parise (`@jparise `_) * Kristian Glass (`@doismellburning `_) * Lukasz Piatkowski (`@lukaspiatkowski `_) * Luke Hinds (`@lukehinds `_) * Matt Seymour (`@mattseymour `_) * Michael Tinsley (`@michaeltinsley `_) * Michal Petrucha (`@koniiiik `_) * Phil Frost (`@bitglue `_) * Phil Jones (`@pgjones `_) * Pierre Sassoulas (`@Pierre-Sassoulas `_) * SergeyKosarchuk (`@SergeyKosarchuk `_) * Shachar Ohana (`@shacharoo `_) * StÊphane Brunner (`@sbrunner `_) * Steven Myint (`@myint `_) * Sushobhit (`@sushobhit27 `_) * Yaroslav Kurlaev (`@ykurlaev `_) prospector-dev-prospector-307b697/LICENSE000066400000000000000000000431741522611751700201740ustar00rootroot00000000000000GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Pylint plugin for improving code analysis for when using Django Copyright (C) 2013 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. {signature of Ty Coon}, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. prospector-dev-prospector-307b697/README.rst000066400000000000000000000164151522611751700206540ustar00rootroot00000000000000prospector ========== .. image:: https://img.shields.io/pypi/v/prospector.svg :target: https://pypi.python.org/pypi/prospector :alt: Latest Version of Prospector .. image:: https://github.com/PyCQA/prospector/actions/workflows/tests.yml/badge.svg :target: https://github.com/PyCQA/prospector/actions/workflows/tests.yml :alt: Build Status .. image:: https://img.shields.io/coveralls/PyCQA/prospector.svg?style=flat :target: https://coveralls.io/r/PyCQA/prospector :alt: Test Coverage .. image:: https://readthedocs.org/projects/prospector/badge/?version=latest :target: https://prospector.readthedocs.io/ :alt: 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 `_, `pycodestyle `_, 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 from PyPI 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 local development, `poetry `_ is used. Check out the code, then run:: poetry install And for extras:: poetry install -E with_everything 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``: .. code-block:: yaml repos: - repo: https://github.com/PyCQA/prospector rev: v1.16.1 # The version of Prospector to use, if not 'master' for latest hooks: - id: prospector This only installs base prospector - if you also use optional tools, for example bandit and/or mypy, then you can add them to the hook configuration like so: .. code-block:: yaml repos: - repo: https://github.com/PyCQA/prospector rev: v1.16.1 hooks: - id: prospector additional_dependencies: - ".[with_mypy,with_bandit]" args: [ '--with-tool=mypy', '--with-tool=bandit', ] Additional dependencies can be `individually configured `_ in your `prospector.yml` file : .. code-block:: yaml # https://bandit.readthedocs.io/en/latest/config.html bandit: options: skips: - B201 - B601 - B610 - B611 - B703 # https://mypy.readthedocs.io/en/stable/command_line.html mypy: options: ignore-missing-imports: true For prospector options which affect display only - those which are not configurable using a profile - these can be added as command line arguments to the hook. For example: .. code-block:: yaml repos: - repo: https://github.com/PyCQA/prospector rev: v1.16.1 hooks: - id: prospector additional_dependencies: - ".[with_mypy,with_bandit]" args: - --with-tool=mypy - --with-tool=bandit - --summary-only - --zero-exit License ------- Prospector is available under the GPLv2 License. prospector-dev-prospector-307b697/docs/000077500000000000000000000000001522611751700201065ustar00rootroot00000000000000prospector-dev-prospector-307b697/docs/Makefile000066400000000000000000000151761522611751700215600ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://www.sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Prospector.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Prospector.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/Prospector" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Prospector" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." prospector-dev-prospector-307b697/docs/_templates/000077500000000000000000000000001522611751700222435ustar00rootroot00000000000000prospector-dev-prospector-307b697/docs/_templates/globaltoc.html000066400000000000000000000014501522611751700250770ustar00rootroot00000000000000

{{ _('Table Of Contents') }}

{%- if display_toc %}
{{ toc }} {%- endif %}
Index
prospector-dev-prospector-307b697/docs/_templates/layout.html000066400000000000000000000024161522611751700244510ustar00rootroot00000000000000{# Copied from: https://raw.githubusercontent.com/pallets/pallets-sphinx-themes/b0c6c41849b4e15cbf62cc1d95c05ef2b3e155c8/src/pallets_sphinx_themes/themes/pocoo/layout.html And removed the warning version (see #7331). #} {% extends "basic/layout.html" %} {% set metatags %} {{- metatags }} {%- endset %} {% block extrahead %} {%- if page_canonical_url %} {%- endif %} {{ super() }} {%- endblock %} {% block sidebarlogo %} {% if pagename != "index" or theme_index_sidebar_logo %} {{ super() }} {% endif %} {% endblock %} {% block relbar2 %}{% endblock %} {% block sidebar2 %} {{- super() }} {%- endblock %} {% block footer %} {{ super() }} {%- if READTHEDOCS and not readthedocs_docsearch %} {%- endif %} {{ js_tag("_static/version_warning_offset.js") }} {% endblock %} prospector-dev-prospector-307b697/docs/_templates/links.html000066400000000000000000000005411522611751700242510ustar00rootroot00000000000000

Useful Links

prospector-dev-prospector-307b697/docs/_templates/relations.html000066400000000000000000000011001522611751700251210ustar00rootroot00000000000000

Related Topics

prospector-dev-prospector-307b697/docs/_templates/sidebarintro.html000066400000000000000000000001141522611751700256120ustar00rootroot00000000000000

About prospector

Prospector runs your favourite linters

prospector-dev-prospector-307b697/docs/_templates/slim_searchbox.html000066400000000000000000000010171522611751700261320ustar00rootroot00000000000000{# basic/searchbox.html with heading removed. #} {%- if pagename != "search" and builder != "singlehtml" %} {%- endif %} prospector-dev-prospector-307b697/docs/changelog.rst000066400000000000000000000000601522611751700225630ustar00rootroot00000000000000.. _`changelog`: .. include:: ../CHANGELOG.rst prospector-dev-prospector-307b697/docs/conf.py000066400000000000000000000212031522611751700214030ustar00rootroot00000000000000# # Prospector documentation build configuration file, created by # sphinx-quickstart on Sun Sep 28 11:26:59 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # import os # import sys import importlib.metadata version = importlib.metadata.version("prospector") release = ".".join(version.split(".")[:2]) # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ "sphinxarg.ext", "sphinx.ext.autodoc", "sphinx.ext.viewcode", ] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] # The suffix of source filenames. source_suffix = ".rst" # The encoding of source files. # source_encoding = 'utf-8-sig' # The master toctree document. master_doc = "contents" # General information about the project. project = "Prospector" copyright = "2014-2020, Carl Crowder" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # release = The short X.Y version. # version = The full version, including alpha/beta/rc tags. release = ".".join(version.split(".")[:2]) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. # today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ["_build"] # The reST default role (used for this markup: `text`) to use for all # documents. # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). add_module_names = False # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. # show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. # keep_warnings = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = "alabaster" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". html_title = "prospector documentation" # A shorter title for the navigation bar. Default is the same as html_title. html_short_title = f"prospector-{version}" # The name of an image file (relative to this directory) to place at the top # of the sidebar. # html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ["_static"] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. # html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. # html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. html_sidebars = { "index": [ "slim_searchbox.html", "sidebarintro.html", "globaltoc.html", "links.html", "sourcelink.html", ], "**": [ "slim_searchbox.html", "globaltoc.html", "relations.html", "links.html", "sourcelink.html", ], } # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. html_domain_indices = True # If false, no index is generated. html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False # If true, links to the reST sources are added to the pages. # html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. # html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. # html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. # html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). # html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = "Prospectordoc" # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # 'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ("index", "Prospector.tex", "Prospector Documentation", "Carl Crowder", "manual"), ] # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False # If true, show page references after internal links. # latex_show_pagerefs = False # If true, show URL addresses after external links. # latex_show_urls = False # Documents to append as an appendix to all manuals. # latex_appendices = [] # If false, no module index is generated. # latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [("index", "prospector", "Prospector Documentation", ["Carl Crowder"], 1)] # If true, show URL addresses after external links. # man_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ( "index", "Prospector", "Prospector Documentation", "Carl Crowder", "Prospector", "One line description of project.", "Miscellaneous", ), ] # Documents to append as an appendix to all manuals. # texinfo_appendices = [] # If false, no module index is generated. # texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. # texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. # texinfo_no_detailmenu = False prospector-dev-prospector-307b697/docs/contents.rst000066400000000000000000000004001522611751700224670ustar00rootroot00000000000000Contents --------- .. toctree:: :caption: Table of Contents :maxdepth: 2 :numbered: 1 index usage profiles suppression supported_tools pre-commit contrib .. only:: html .. toctree:: :maxdepth: 1 changelog prospector-dev-prospector-307b697/docs/contrib.rst000066400000000000000000000033031522611751700222770ustar00rootroot00000000000000Contributing ============ All contributions are very welcome! You can contribute in many ways: * Join the `python code quality`_ mailing list and answer questions. * Report bugs on the GitHub `issue tracker`_. * Submit pull requests on the GitHub `repository`_. Ideally make a pull request to the *develop* branch, as I prefer to keep the master branch the same as the most recent release on PyPI. If you do this, be sure to add yourself to the CONTRIBUTORS.md file too! .. _python code quality: https://mail.python.org/mailman/listinfo/code-quality .. _issue tracker: https://github.com/PyCQA/prospector/issues .. _repository: https://github.com/PyCQA/prospector Code Quality ------------ As a code quality testing tool, it makes sense to strive to be a good example of good code! To that end, prospector is checked by `Landscape `_ and ideally when making a pull request, please take note of any decreases in quality. Additionally, there is a `pre-commit `_ configuration to prevent various small problems before they are committed. Check the site for more information but the short version is to install it first before committing:: pre-commit install Tests ----- There are not a huge number of tests right now, as most of the code in Prospector is handling the output of other tools. However, please do run them before submitting a pull request:: pytest Prospector targets Python 3.6, 3.7, 3.8, 3.9 and 3.10. You can use `tox`_ to test this locally, and all tests are run on github Actions. .. _tox: https://tox.readthedocs.io/en/latest/ .. include:: ../CONTRIBUTORS.rst Developer Reference -------------------- .. toctree:: :maxdepth: 2 reference prospector-dev-prospector-307b697/docs/index.rst000066400000000000000000000127441522611751700217570ustar00rootroot00000000000000.. Prospector documentation master file, created by sphinx-quickstart on Sun Sep 28 11:26:59 2014. Prospector - Python Static Analysis =================================== About ----- .. image:: https://img.shields.io/pypi/v/prospector.svg :target: https://pypi.python.org/pypi/prospector :alt: Latest Version of Prospector .. image:: https://github.com/PyCQA/prospector/actions/workflows/tests.yml/badge.svg :target: https://github.com/PyCQA/prospector/actions/workflows/tests.yml :alt: Build Status .. image:: https://img.shields.io/coveralls/PyCQA/prospector.svg?style=flat :target: https://coveralls.io/r/PyCQA/prospector :alt: Test Coverage 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`_, `pycodestyle`_, and `McCabe complexity`_. See the :doc:`Supported Tools` section for a complete list of default and optional extra tools. 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. .. _pylint: https://pylint.readthedocs.io/ .. _pycodestyle: https://pycodestyle.pycqa.org/ .. _McCabe complexity: https://pypi.python.org/pypi/mccabe Installation ------------ You can install default tools using ``pip`` command:: pip install prospector For a full list of optional extra tools, and specific examples to install each of them, see the :doc:`page on supported tools `. For example to install an optional tool such as ``pyroma``:: pip install prospector[with_pyroma] .. Note:: Some shells (such as ``Zsh``, the default shell of macOS Catalina) require brackets to be escaped:: pip install prospector\[with_pyroma\] To install two or more optional extra tools at the same time, they must be comma separated (and without spaces). For example to install mypy and bandit:: pip install prospector[with_mypy,with_bandit] And to install all optional extra tools at the same time, install prospector using the ``with_everything`` option:: pip install prospector[with_everything] For best results, you should install prospector to the same place as your project and its dependencies. That is, if you are using virtual environments, install prospector into that virtual environment alongside your code. This allows the underlying tools to give better results, as they can infer and use knowledge of libraries that you use. If you install prospector system-wide and use it on a project in a virtual environment, you will see several incorrect errors because prospector cannot access the libraries your project uses. 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 Read about the full list of options in the :doc:`usage ` page. It is also possible to use prospector as a :doc:`pre-commit hook `. Behaviour --------- Adapting to Dependencies ```````````````````````` Prospector will `try to detect `_ the libraries that your project uses, and adapt the output and filtering to those libraries. For example, if you use Django, the `pylint-django `_ plugin will be loaded to help Pylint inspect Django-specific code. There is currently support for the following frameworks: - `Celery `_ - `Django `_ - `Flask `_ If you have a suggestion for another framework or library which should be supported, please `add an issue `_ or :doc:`consider creating a pull request `. Strictness `````````` Prospector can be configured to be more or less strict. The more strict, the more errors and warnings it will find. At higher strictness levels, you may find that the output is a bit too picky. The default level is designed to give useful output and warnings but also to suppress messages which are not necessarily useful. To change the strictness level:: prospector --strictness high Valid levels are ``verylow``, ``low``, ``medium``, ``high`` and ``veryhigh``. Profiles ```````` A profile is a YAML file containing various directives about which messages and which tools to allow or disable. Profiles can inherit from each other, allowing you to adapt the behaviour of existing profiles or compose several smaller specialised profiles into one to suit your project. Note that the 'strictness' is implemented as a profile. There is more detail about profiles and how to use them on :doc:`the profiles documentation ` page. Pre-commit Hook ``````````````` Prospector can be configured as a `pre-commit `_ hook. For more information see :doc:`the pre-commit documentation `. License ------- Prospector is available under the GPLv2 License. prospector-dev-prospector-307b697/docs/pre-commit.rst000066400000000000000000000030551522611751700227170ustar00rootroot00000000000000Pre-commit Hook =============== 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.10.0 # The version of Prospector to use, if not 'master' for latest hooks: - id: prospector .. _pre-commit: https://pre-commit.com/ Commandline Arguments --------------------- Some controls for prospector, especially surrounding how the output is displayed, are not :doc:`configurable from a profile `, only from the commandline. To add command-line arguments to the pre-commit hook config file:: repos: - repo: https://github.com/PyCQA/prospector rev: 1.10.0 hooks: - id: prospector args: - --summary-only Optional Tools -------------- By default the configuration will only install :doc:`the base supported tools ` and not optional tools. If you also use optional tools, for example bandit or mypy, then you can add them to the hook configuration like so:: repos: - repo: https://github.com/PyCQA/prospector rev: 1.10.0 hooks: - id: prospector additional_dependencies: - ".[with-mypy,with-bandit]" - args: [ '--with-tool=mypy', '--with-tool=bandit', ] This is equivalent to running:: pip install prospector[with-bandit,with-mypy] prospector-dev-prospector-307b697/docs/profiles.rst000066400000000000000000000445661522611751700225020ustar00rootroot00000000000000Profiles / Configuration ======================== The behavior of prospector can be configured by creating a profile. A profile is a YAML file containing several sections as described below. Prospector will search for a ``.prospector.yaml`` file (and `several others`_) in the path that it is checking. If found, it will automatically be loaded. Otherwise, you can pass in the profile as an argument:: prospector --profile /path/to/your/profile.yaml You can also use a name instead of the path, if it is on the ``profile-path``:: prospector --profile my_profile In general, command-line arguments override and take precedence over values found in profiles. .. _several others: https://github.com/PyCQA/prospector/blob/master/prospector/profiles/__init__.py .. _profile_path: Profile Path ------------ The name of a profile is the filename without the ``.yaml`` extension. So if you create a profile called 'my_project.yaml', the name will be 'my_project'. Inheritance works by searching the ``profile-path`` for files matching the name in the inheritance list. The ``profile-path`` is where Prospector should search when looking for profiles. By default, it will look in the directory containing the `built-in profiles`_, as well as the directory where prospector is running, and a ``.prospector`` directory relative to that. To add additional places to search:: prospector --profile-path path/to/your/profiles .. _built-in profiles: https://github.com/PyCQA/prospector/tree/master/prospector/profiles/profiles Example ------- Here is an example profile:: output-format: json strictness: medium test-warnings: true doc-warnings: false inherits: - my/other/profile.yml ignore-paths: - docs ignore-patterns: - (^|/)skip(this)?(/|$) pycodestyle: disable: - W602 - W603 enable: - W601 options: max-line-length: 79 mccabe: run: false Builtin Profiles ---------------- Prospector comes with several built-in profiles, which power some of strictness and style options. You can see the `full list on GitHub `_. Global Configuration options ---------------------------- Global configuration options for tools are the following: * output-format_ * strictness_ * test-warnings_ * doc-warnings_ * member-warnings_ * inherits_ * ignore-paths_ * ignore-patterns_ * autodetect_ * uses_ * max-line-length_ .. _output-format: Output-format ............. Same command line options are available. See :doc:`Output format ` .. _strictness: Strictness .......... There is a command line argument to tweak how picky Prospector will be:: prospector --strictness This is implemented using profiles, and is simply a list of messages to disable at each level of strictness. If creating your own profile, you can use the ``strictness`` like so:: strictness: medium Valid values are ``verylow``, ``low``, ``medium`` (the default), ``high`` and ``veryhigh``. If you don't specify a strictness value, then the default of ``medium`` will be used. To avoid using any of Prospector's default strictness profiles, set ``strictness: none``. There are some aspects of analysis which can be turned on or off separately from the strictness or individual tuning of the tools. Example: .. _doc-warnings: Documentation Warnings ...................... By default prospector will not produce warnings about missing documentation or `docstring styleguide violations `_. If you want to see these, use the ``--doc-warnings`` flag at runtime or include it in your profile:: doc-warnings: true This will turn on the otherwise disabled ``pycodestyle`` tool. .. _test-warnings: Test Warnings ............. Prospector will not inspect unit tests and test files by default. You can turn this on using the ``--test-warnings`` flag or in your profile:: test-warnings: true .. _member-warnings: Member Warnings ............... Pylint generates warnings when you try to access an attribute of a class that does not exist, or import a module that does not exist. Unfortunately it is not always accurate and in some projects, this message is a large amount of noise. Prospector therefore turns these messages off by default, but you can turn it on using the ``--member-warnings`` flag or in a profile:: member-warnings: true .. _uses: .. _autodetect: Libraries Used and Autodetect ............................. Prospector will adjust the behavior of the underlying tools based on the libraries that your project uses. If you use Django, for example, the `pylint-django `_ plugin will be loaded. This will happen automatically. If prospector is not correctly determining which of its supported libraries you use, you can specify it manually in the profile:: uses: - django - celery - flask Currently, Django, Flask and Celery have plugins. If prospector is incorrectly deciding that you use one of these, you can turn off autodetection:: autodetect: false .. _inherits: Inheritance ........... Profiles can inherit from other profiles, and can inherit from more than one profile. Prospector merges together all of the options in each profile, starting at the top of the inheritance tree and overwriting values with those found lower. The example profile above inherits from another profile provided by the user, ``my/other/profile.yml``. This allows you to have, for example, a project wide default profile with specific overrides for each individual repository or library. It is possible to inherit from the built-in prospector profiles as well, although there are shortcuts for most of the built-ins, see below.:: inherits: - strictness_medium - full_pep8 For lists, such as the ``ignore`` section, they will be merged together rather than overwritten - so essentially, the ``ignore`` section will accumulate. The profile named in the ``inherits`` section must be on the :ref:`profile path `. Inheritance can also be optional - for example, if each developer might have a local prospector configuration but that's not guaranteed, then you can inherit from a profile with the ``?`` suffix and if it is not present, prospector will simply carry on. For example:: inherits: - project_config - local_config? In this case, if a developer has a local profile called 'local_config' it would append to the project-wide configuration, but if they don't, prospector won't error with a ``ProfileNotFound`` exception. Note that when using profiles, prospector does not automatically configure ``strictness``. The assumption is that if you provide a profile, you provide all the information about which messages to turn on or off. To keep the strictness functionality, simply inherit from the built-in prospector profiles:: inherits: - strictness_medium The ``inherits`` file can also be in an external package, if you specify a name Prospector will search for a tile named ``prospector.yaml`` or ``prospector.yml`` in the module ``prospector-profile-``. And if the name contains a ``:`` this mean that we use the syntax ``:`` to search the file named ``.yaml`` or ``.yml`` in the module name ``prospector-profile-``. For example:: inherits: - my_module - my_module:my_file .. _ignore-paths: .. _ignore-patterns: Ignoring Paths and patterns ........................... There are two ways to ignore paths or files. Firstly, with the ``ignore-paths`` section. This is a list of paths to ignore relative to the repository root. It can be a directory, in which case the directory contents and all subdirectories are ignored, or it can be a specific file. For example, ``docs`` would ignore a directory in the repository root called "docs", while ``mypackage/vendor`` would ignore anything in the directory at "mypackage/vendor". Secondly, ``ignore-patterns`` is a list of regular expressions. The relative path of files and directories is *searched* for each regular expression, and ignored if any matches are found. If the expression matches a directory, the directory contents and all subdirectories are ignored. For example, ``^example/doc_.*\.py$`` would ignore any files in the "example" directory beginning with "doc\_". Another example: ``(^|/)docs(/|$)`` would ignore all directories called "docs" in the entire repository. Note that a further option called ``ignore`` is available. This is equivalent to ``ignore-patterns``, and is from an older version of the configuration. It will continue working, but it is deprecated, and you should update your profile if you are using it. .. _max-line-length: Max Line Length ............... This general option, provides a way to select maximum line length allowed. .. Note:: This general option overrides and takes precedence over same option in a particular tool (pycodestyle or pylint) Individual Configuration Options -------------------------------- Each tool can be individually configured with a section beginning with the tool name (in lowercase). Valid values are ``bandit``, ``dodgy``, ``frosted``, ``mccabe``, ``mypy``, ``pydocstyle``, ``pycodestyle``, ``pyflakes``, ``pylint``, ``pyright``, ``pyroma``, ``vulture`` and ``ruff``. Enabling and Disabling Tools ............................ There are :doc:`7 default and 5 optional `. Unless otherwise configured, the defaults are enabled and the optional tools are disabled. In a profile, you can enable or disable a tool using the boolean ``run``:: pyroma: run: true Note that the ``--tools`` :doc:`command line argument ` overrides profiles if used. Enabling and Disabling Messages ............................... Messages can be enabled or disabled using the tool's code for the output. These codes are either from the tool itself, or provided by prospector for those tools which do not have message codes. The list of tools and message codes can be found `in the tools package `_. The typical desired action is to disable messages:: pylint: disable: - method-hidden - access-member-before-definition However, you can also enable messages which were disabled by parent profiles:: pylint: enable: - method-hidden - access-member-before-definition Pylint Plugins .............. It is possible to specify list of plugins for Pylint. You can do this by using ``load-plugins`` option in ``pylint`` section:: pylint: load-plugins: - plugin - plugin Note that this option doesn't affect loading of :ref:`autodetected plugins `. PEP8 Control ............ The strictness will turn on or off different messages generated by the `pycodestyle `_ tool depending on how picky they are. However, if you want to have the standard 'medium' strictness but get either complete or zero pep8 style warnings, you can use a shorthand like below:: pep8: full: true Or:: pep8: none: true Note that this section is also the section for configuring the pycodestyle tool, see below. Therefore you can turn on all warnings from pep8 but turn off just one or two individually or otherwise tweak the tool like so:: pycodestyle: full: true disable: - E126 options: max-line-length: 120 Tool Options ............ Some tools can be further configured or tweaked using an options hash:: pycodestyle: options: max-line-length: 120 The available options are: +----------------+------------------------+----------------------------------------------+ | Tool + Option Name + Possible Values | +================+========================+==============================================+ | mccabe | max-complexity | Maximum number of paths allowed in a method | +----------------+------------------------+----------------------------------------------+ | pycodestyle | max-line-length | Maximum line length allowed (This option is | | | | overridden by global option max-line-length_)| +----------------+------------------------+----------------------------------------------+ | pylint | -anything- | Any of the `pylint options`_ | +----------------+------------------------+----------------------------------------------+ | mypy | use-dmypy | Use mypy daemon (mypy server) for faster | | | | checks | +----------------+------------------------+----------------------------------------------+ | mypy | -anything-other- | Any of the `mypy options`_, | | | | if the value is a list of string we it | | | | corresponds to the argument like | | | | `---` | | | | e.g. `disallow: [any-expr, any-explicit]` => | | | | `--disallow-any-expr --disallow-any-explicit`| +----------------+------------------------+----------------------------------------------+ | bandit | config | configuration filename | +----------------+------------------------+----------------------------------------------+ | bandit | profile | profile to use | +----------------+------------------------+----------------------------------------------+ | bandit | severity | report only issues of a given severity | +----------------+------------------------+----------------------------------------------+ | bandit | confidence | report only issues of a given confidence | +----------------+------------------------+----------------------------------------------+ | bandit | -anything-other- | Options pass to Bandit directly | +----------------+------------------------+----------------------------------------------+ | pyright | level | Minimum diagnostic level (error or warning) | +----------------+------------------------+----------------------------------------------+ | pyright | project | Path to location of configuration file | +----------------+------------------------+----------------------------------------------+ | pyright | pythonplatform | Analyze for a specific platform (Darwin, | | | | Linux, Windows) | +----------------+------------------------+----------------------------------------------+ | pyright | pythonversion | Analyze for a specific version | +----------------+------------------------+----------------------------------------------+ | pyright | skipunannotated | Skip analysis of functions with no type | | | | annotations | +----------------+------------------------+----------------------------------------------+ | pyright | typeshed-path | Path to location of typeshed type stubs | +----------------+------------------------+----------------------------------------------+ | pyright | venv-path | Directory that contains virtual environments | +----------------+------------------------+----------------------------------------------+ | ruff | -anything- | Options pass to ruff as argument | | | | `True` => --