1

Flake8 is given me the D103 Missing docstring in public function error for my unit tests. I would not consider my unit tests public functions. I get:

test/base_classes/test_component.py:7:1: D103 Missing docstring in public function
test/base_classes/test_component.py:13:1: D103 Missing docstring in public function
test/base_classes/test_component.py:25:1: D103 Missing docstring in public function
test/base_classes/test_component.py:35:1: D103 Missing docstring in public function
test/base_classes/test_component.py:41:1: D103 Missing docstring in public function

How do I disable this check for my tests?

Jorrick Sleijster
  • 935
  • 1
  • 9
  • 22

1 Answers1

3

You can add the following to your .flake8 file at the root of your repository to ignore all D103 errors for test code:

per-file-ignores =
     test/*: D103
Jorrick Sleijster
  • 935
  • 1
  • 9
  • 22