remove trailing whitespace and add docstrings

3 jobs for search in 2 minutes and 53 seconds (queued for 3 seconds)
latest
Status Job ID Name Coverage
  Test
passed #2597
linters

00:01:01

passed #2595
python36

00:00:57

passed #2596
python37

00:00:54