diff --git a/README.md b/README.md index 6b3a5c9..18a8c77 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # mypy-baseline -A CLI tool for painless integration of mypy with an existing Python project. When you run it for the first time, it will remember all type errors that you already have in the project (generate "baseline"). All consequentive runs will ignore these errors and report only ones that you introduced after that. +A CLI tool for painless integration of mypy with an existing Python project. When you run it for the first time, it will remember all type errors that you already have in the project (generate "baseline"). All consecutive runs will ignore these errors and report only ones that you introduced after that. Additionally, the tool will show you what progress you made since the last baseline, to encourage your team to resolve mypy errors: @@ -17,7 +17,7 @@ Features: + Baseline is carefully crafted to avoid merge conflicts. + Baseline is human-readable, and diffs are informative. The reviewers of your PR will know exactly what errors you resolve and what errors you introduced. + Track the progress you make with git-based history of changes and burndown chart of resolved type violations. -+ Ignore speicific error messages (using regular expressions), so that buggy mypy plugins don't bother you with false-positives. ++ Ignore specific error messages (using regular expressions) and error categories, so that buggy mypy plugins don't bother you with false-positives. ## Installation diff --git a/docs/config.md b/docs/config.md index e14b9b0..94f14a8 100644 --- a/docs/config.md +++ b/docs/config.md @@ -2,20 +2,22 @@ The tool has a number of CLI flags to configure the behavior of `filter`. The default value for each flag can be specified in `pyproject.toml`. There are all the configuration options and their defaults: -```python +```toml [tool.mypy-baseline] # --baseline-path: the file where the baseline should be stored baseline_path = "mypy-baseline.txt" # --depth: cut path names longer than that many directories deep depth = 40 # --allow-unsynced: do not fail for unsynced resolved errors -allow_unsynced = False +allow_unsynced = false # --preserve-position: do not remove error position from the baseline -preserve_position = False +preserve_position = false # --hide-stats: do not show stats and messages at the end -hide_stats = False +hide_stats = false # --no-colors: do not use colors in stats -no_colors = False -# --ignore: regexes for error messages to ignore +no_colors = false +# --ignore: regexes for error messages to ignore, e.g. ".*Enum.*" ignore = [] +# --ignore-categories: categories of mypy errors to ignore, e.g. "note" or "call-arg" +ignore_categories = [] ``` diff --git a/pyproject.toml b/pyproject.toml index 7892f1c..bdc47ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ Source = "https://github.com/orsinium-labs/mypy-baseline" mypy-baseline = "mypy_baseline:entrypoint" [tool.mypy] -files = ["mypy_baseline"] +files = ["mypy_baseline", "tests"] python_version = 3.8 ignore_missing_imports = true # follow_imports = "silent"