repos:

# Automatic source code formatting
- repo: https://github.com/psf/black
  rev: 20.8b1
  hooks:
  - id: black
    args: [--safe, --quiet]

# Syntax check and some basic flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v2.0.0
  hooks:
  - id: check-ast
  - id: check-yaml
  - id: flake8
    args: ['--max-line-length=88', '--select=W291,W292,W293,F401']

repos:

# Automatic source code formatting
- repo: https://github.com/psf/black
  rev: 20.8b1
  hooks:
  - id: black
    args: [--safe, --quiet]

# Syntax check and flake8 checks
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v2.0.0
  hooks:
  - id: check-ast
  - id: check-yaml
  - id: flake8
    args: ['--max-line-length=88', '--select=E401,E711,E712,E713,E714,E721,E722,E901,F401,F402,F403,F405,F631,F632,F633,F811,F812,F821,F822,F841,F901,W191,W291,W292,W293,W602,W603,W604,W605,W606']

Add more stringent flake8 checks
Add more stringent flake8 checks

This covers things such as
 * assigned but unused variables,
 * redefinition of unused variable
 * undefined names
 * bare 'except's
   (these also catch KeyboardInterrupt, which may not be intentional)
 * comparison to True/False with ==/!= instead of is/is not
