WSC005: No newline at end of file¶
This rule enforces one \n
at end of file.
Example¶
Input file: examples/WSC005_no_new_line_at_eof.py
class LabelPrinter:
def print(self, printer: (Printer, None)=None, copies: int=1):
printer = printer or Printer(config.App.LABEL_PRINTER)
self.print_to_pdf()
printer.print_pdf(self.__pdf_path, options={'copies': str(copies)})
Command:
$ wscheck 'examples/WSC005_no_new_line_at_eof.py'
In examples/WSC005_no_new_line_at_eof.py line 6:
printer.print_pdf(self.__pdf_path, options={'copies': str(copies)})
^-- WSC005: No newline at end of file