check-package: fix code style

Ignore these warnings:
F401 'lib.ConsecutiveEmptyLines' imported but unused

And remove comments that are not needed anymore.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Ricardo Martincoski 2018-01-21 22:44:35 -02:00 committed by Thomas Petazzoni
parent a3bb315e42
commit deb31a979a
5 changed files with 13 additions and 19 deletions

View File

@ -6,11 +6,10 @@
import re import re
from base import _CheckFunction from base import _CheckFunction
# Notice: ignore 'imported but unused' from pyflakes for check functions. from lib import ConsecutiveEmptyLines # noqa: F401
from lib import ConsecutiveEmptyLines from lib import EmptyLastLine # noqa: F401
from lib import EmptyLastLine from lib import NewlineAtEof # noqa: F401
from lib import NewlineAtEof from lib import TrailingSpace # noqa: F401
from lib import TrailingSpace
def _empty_or_comment(text): def _empty_or_comment(text):

View File

@ -6,11 +6,10 @@
import re import re
from base import _CheckFunction from base import _CheckFunction
# Notice: ignore 'imported but unused' from pyflakes for check functions. from lib import ConsecutiveEmptyLines # noqa: F401
from lib import ConsecutiveEmptyLines from lib import EmptyLastLine # noqa: F401
from lib import EmptyLastLine from lib import NewlineAtEof # noqa: F401
from lib import NewlineAtEof from lib import TrailingSpace # noqa: F401
from lib import TrailingSpace
def _empty_line_or_comment(text): def _empty_line_or_comment(text):

View File

@ -7,11 +7,10 @@
import re import re
from base import _CheckFunction from base import _CheckFunction
# Notice: ignore 'imported but unused' from pyflakes for check functions. from lib import ConsecutiveEmptyLines # noqa: F401
from lib import ConsecutiveEmptyLines from lib import EmptyLastLine # noqa: F401
from lib import EmptyLastLine from lib import NewlineAtEof # noqa: F401
from lib import NewlineAtEof from lib import TrailingSpace # noqa: F401
from lib import TrailingSpace
class Indent(_CheckFunction): class Indent(_CheckFunction):

View File

@ -6,8 +6,7 @@
import re import re
from base import _CheckFunction from base import _CheckFunction
# Notice: ignore 'imported but unused' from pyflakes for check functions. from lib import NewlineAtEof # noqa: F401
from lib import NewlineAtEof
class ApplyOrder(_CheckFunction): class ApplyOrder(_CheckFunction):

View File

@ -28,8 +28,6 @@ Some hints when changing this code:
- when there is no other reason for ordering, use alphabetical order (e.g. keep - when there is no other reason for ordering, use alphabetical order (e.g. keep
the check functions in alphabetical order, keep the imports in alphabetical the check functions in alphabetical order, keep the imports in alphabetical
order, and so on). order, and so on).
- use pyflakes to detect and fix potential problems.
- use pep8 formatting.
- keep in mind that for every class the method before() will be called before - keep in mind that for every class the method before() will be called before
any line is served to be checked by the method check_line(). A class that any line is served to be checked by the method check_line(). A class that
checks the filename should only implement the method before(). A function that checks the filename should only implement the method before(). A function that