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-pyprojects-toml-as-project-tool #4

Open
utterances-bot opened this issue Jul 16, 2021 · 1 comment
Open

use-pyprojects-toml-as-project-tool #4

utterances-bot opened this issue Jul 16, 2021 · 1 comment

Comments

@utterances-bot
Copy link

使用 pyproject.toml 管理你的 Python 项目

就差 mypy 了,求龟叔可怜一下强迫症患者

https://emergencyexit.xyz/use-pyprojects-toml-as-project-tool.html

Copy link
Owner

IMBlues commented Jul 16, 2021

更新

mypy 已经支持

python/mypy#10219

升级到 v0.910 版本即可

pre-commit 中可配置:

- repo: https://github.com/pre-commit/mirrors-mypy
  rev: "v0.910"
  hooks:
    - id: mypy

pyproject.toml 中可以配置:

[tool.mypy]
ignore_missing_imports = true
show_error_codes = true

[[tool.mypy.overrides]]
module = "*.migrations.*"
ignore_errors = true

flake9 更新缓慢,可以使用 pflake8 替代

flake9 已经参考在 pre-commit 中使用

- repo: https://github.com/pycqa/flake8
      rev: 3.9.2
      hooks:
        - id: flake8
          entry: pflake8
          additional_dependencies: [pyproject-flake8]

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