Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Incorrect additional_dependencies documentation to run prospector as a pre-commit hook with mypy support #633

Closed
jdechicchis opened this issue Sep 10, 2023 · 2 comments

Comments

@jdechicchis
Copy link
Contributor

Describe the bug

The documentation for additional_dependencies to run prospector as a pre-commit hook with mypy support appears incorrect.

To Reproduce

Follow the instructions at https://github.com/landscapeio/prospector/blob/master/docs/pre-commit.rst with pre-commit config:

- repo: https://github.com/PyCQA/prospector
  rev: 1.10.0
  hooks:
  - id: prospector
    additional_dependencies:
    - .[with_mypy]
    args: [--with-tool=mypy]

Run pre-commit and get error:

cannot run tool mypy as support was not installed.
Please install by running 'pip install prospector[with_mypy]'

Now change pre-commit config to (note the change in underscore with_mypy to hyphen with-mypy):

- repo: https://github.com/PyCQA/prospector
  rev: 1.10.0
  hooks:
  - id: prospector
    additional_dependencies:
    - .[with-mypy]
    args: [--with-tool=mypy]

pre-commit runs as expected

Expected behavior

Following the docs should lead to running prospector with mypy support in pre-commit without error.

Environment (please complete the following information):

  • OS: macOS
  • Prospector version: 1.10.2
  • Python version: 3.11.5
  • pre-commit version: 3.4.0

Additional context

Happy to make a PR to update the docs!

@Pierre-Sassoulas
Copy link
Collaborator

Thanks for opening the issue ! (you probably could have made the PR directly ;))

@jdechicchis
Copy link
Contributor Author

Done! Will do next time 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants