albertyw/albertyw.com

View on GitHub
app/notes/20191214-1934.md

Summary

Maintainability
Test Coverage
Use the Default Flake8 Ignores

default-flake8-ignores

1576352044

Flake8 provides a way to ignore PEP8 rules through its `--ignore` and
`--extend-ignore` flags.  The former overwrites a default list of errors
and warnings, including [W503](https://www.flake8rules.com/rules/W503.html)
and [W504](https://www.flake8rules.com/rules/W504.html) which are
mutually incompatible.  Therefore, using `--ignore` will implicitly enable
both of these mutually incompatible rules.  It's better to use `--extend-ignore` and
not use `--ignore` when running flake8.  In `.flake8` config files, use

```ini
[flake8]
extend-ignore = ...
```

instead of

```ini
[flake8]
ignore = ...
```