remove trailing whitespace and add docstrings

3 jobs for master in 2 minutes and 50 seconds (queued for 2 minutes and 15 seconds)
Status Job ID Name Coverage
  Test
passed #2600
linters

00:01:00

passed #2598
python36

00:00:56

passed #2599
python37

00:00:53