Files
notifications-api/requirements_for_test.txt
Chris Hill-Scott 3b0b96834d Do extra code style checks with flake8-bugbear
Flake8 Bugbear checks for some extra things that aren’t code style
errors, but are likely to introduce bugs or unexpected behaviour. A
good example is having mutable default function arguments, which get
shared between every call to the function and therefore mutating a value
in one place can unexpectedly cause it to change in another.

This commit enables all the extra warnings provided by Flake8 Bugbear,
except for:
- the line length one (because we already lint for that separately)
- B903 Data class should either be immutable or use `__slots__` because
  this seems to false-positive on some of our custom exceptions
- B902 Invalid first argument 'cls' used for instance method because
  some SQLAlchemy decorators (eg `declared_attr`) make things that
  aren’t formally class methods take a class not an instance as their
  first argument

It disables:
- _B306: BaseException.message is removed in Python 3_ because I think
  our exceptions have a custom structure that means the `.message`
  attribute is still present

Matches the work done in other repos:
- https://github.com/alphagov/notifications-admin/pull/3172/files
2020-12-22 16:26:45 +00:00

14 lines
265 B
Plaintext

-r requirements.txt
flake8==3.8.4
flake8-bugbear==20.11.1
moto==1.3.16
pytest==6.1.2
pytest-env==0.6.2
pytest-mock==3.3.1
pytest-cov==2.10.1
pytest-xdist==2.1.0
freezegun==1.0.0
requests-mock==1.8.0
# used for creating manifest file locally
jinja2-cli[yaml]==0.7.0