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

Add mypy support #48

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

moshemoshe137
Copy link

@moshemoshe137 moshemoshe137 commented Dec 22, 2024

Hello,

This is one of my first real PRs 😅 please forgive me

I wonder if we can add support for mypy as well. I often have to sync my mypy requirements under other hooks, such as nbqa. For example:

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: mixed-line-ending
      - id: trailing-whitespace

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.13.0  # Updated automatically with `pre-commit autoupdate`
    hooks:
      - id: mypy
        args:
          - --install-types
          - --non-interactive
        additional_dependencies:
          - pytest

  - repo: https://github.com/nbQA-dev/nbQA
    rev: 1.9.1
    hooks:
      - id: nbqa-check-ast
      - id: nbqa-mypy
        additional_dependencies:
          - mypy==1.13.0  # Must be manually synced with the hook version above
        args:
          - --install-types
          - --non-interactive 

Thank you for your consideration! ~Moshe

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

Successfully merging this pull request may close these issues.

1 participant