Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

any (easy) way to get this to ignore import errors as it does not run in right env? #11

Closed
maxandersen opened this issue Dec 20, 2018 · 2 comments

Comments

@maxandersen
Copy link

i.e. for mypy you can do the following:

-   repo: git://github.com/luismayta/pre-commit-mypy
    sha: '0.1.1'  # Use the sha you want to point at
    hooks:
    -   id: mypy
        args:
        - --ignore-missing-imports
@asottile
Copy link
Member

I'd suggest asking pylint upstream 🤷‍♂️ -- pylint isn't really designed to run in isolation because it does dynamic analysis. You can read more on this subject here

@maxandersen
Copy link
Author

go it.

for those maybe seeing this I solved it by using local repo which means it runs with local env setup:

-   repo: local
    hooks:
      - id: pylint
        name: pylint
        entry: python3 -m pylint.__main__
        language: system
        types: [python]

then imports does get resolved.

SkypLabs added a commit to SkypLabs/probequest that referenced this issue Jul 14, 2019
stuertz added a commit to stuertz/pybunqexport that referenced this issue Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants