Skip to content

[Question] why can't we add pylint in this repo hooks.yaml file? #157

Closed
@lavish205

Description

@lavish205

My .pre-commit-config.yaml file looks like this:

-   repo: https://github.com/pre-commit/pre-commit-hooks
     sha: 52582865ab7ed8f41734253190844c854ddd9a9e
     hooks:
     -   id: trailing-whitespace
     -   id: check-ast
     -   id: debug-statements
     -   id: end-of-file-fixer
-   repo: git://github.com/pre-commit/mirrors-pylint
     sha: v1.6.4
     hooks:
    -   id: pylint

and when I run pre-commit install it creates a repo for pylint in ~/.pre-commit/repoXXXX/ with its own virtual env in it, due to which pylint shows import errors.
So there are two ways to solve this error:

  1. add all required packages in additional_dependencies in .pre-commit-config.yaml file for pylint.
    But I can't add all the packages here because it useless to create two virtual env with same packages.
    Can we however, merge it with our own virtualenv??

  2. if I modify pre-commit-hooks/hooks.yaml and add pylint hook over there, it works perfectly fine.

Can you suggest me which is the best way to do it??

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions