Skip to content

Commit

Permalink
Add type information (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat committed Jul 11, 2023
1 parent 9a77ca5 commit 00020a8
Show file tree
Hide file tree
Showing 7 changed files with 351 additions and 236 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ repos:
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.277"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
Expand All @@ -28,6 +23,11 @@ repos:
hooks:
- id: prettier
args: ["--print-width=120", "--prose-wrap=always"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.277"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: meta
hooks:
- id: check-hooks-apply
Expand Down
14 changes: 13 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ isort = {known-first-party = ["pipdeptree"], required-imports = ["from __future_
ignore = [
"INP001", # no implicit namespace
"D", # ignore documentation for now
"ANN", # No type annotations for now
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
"S104", # Possible binding to all interface
"ANN101", # No type annotation for self
"ANN102", # Missing type annotation for `cls` in classmethod
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in
]
[tool.ruff.per-file-ignores]
"tests/**/*.py" = [
Expand All @@ -94,3 +96,13 @@ html.skip_covered = false
paths.source = ["src", ".tox/*/lib/python*/site-packages", "*/src"]
run.parallel = true
run.plugins = ["covdefaults"]

[tool.mypy]
show_error_codes = true
strict = true
overrides = [
{ module = [
"graphviz.*",
"virtualenv.*",
], ignore_missing_imports = true },
]
Loading

0 comments on commit 00020a8

Please sign in to comment.