Fix trailing space when not html class attribute specified
Refactor: FIX PEP error
Reformat