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

Use type hints strictly #421

Open
injoonH opened this issue Oct 4, 2023 · 0 comments
Open

Use type hints strictly #421

injoonH opened this issue Oct 4, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@injoonH
Copy link
Member

injoonH commented Oct 4, 2023

Type Hinting

Check PEP 484 for type hinting rules.

Type Checkers

Pyright

  1. Settings

    .vscode/settings.json

    {
      "python.analysis.typeCheckingMode": "strict"
    }
  2. Command

    pyright . # 844 errors
  3. Problems

    • Django 관련 에러 해결이 안 된다.
    • django-stubs를 사용하려 했는데 django-stubs는 mypy를 사용한다.
      • (django-stubs를 설치해도 pyright에서는 해결되지 않는다.)

Mypy

  1. Settings

    mypy.ini: @DoyunShin이 PyTorch에서 reference를 얻었다.
    mypy-strict.ini도 있어서 option을 어떻게 사용할지 더 알아본다.

    Getting started를 따라 Mypy를 설치한다.

  2. Command

    Mypy . # 775 erros
@injoonH injoonH added the enhancement New feature or request label Oct 4, 2023
@DoyunShin DoyunShin linked a pull request Oct 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants