From b20b453871eb70de8e2da49cc3d6a902da68815c Mon Sep 17 00:00:00 2001 From: Johannes Thumshirn Date: Tue, 9 Mar 2021 11:37:59 +0100 Subject: [PATCH] fotogrid: make pycodestyle happy make test complains: $ make test pycodestyle *.py fotogrid.py:3:1: E302 expected 2 blank lines, found 0 make: *** [Makefile:17: test] Error 1 This is because pycodestyle interprets the function documentation as python shebang line or module documentation and expects two blank lines afterwards. Move the function documentation into python heredoc. Signed-off-by: Johannes Thumshirn --- fotogrid.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fotogrid.py b/fotogrid.py index b487530..321b4df 100644 --- a/fotogrid.py +++ b/fotogrid.py @@ -1,6 +1,8 @@ -# Provide a simple responsive fotogrid using flex layout. -# Depends on the css/fotogrid.css defined styles. def fotogrid(image_urls): + """ + Provide a simple responsive fotogrid using flex layout. + Depends on the css/fotogrid.css defined styles. + """ result = '
' cols = 4 images = divmod(len(image_urls), cols)