Fix pylint issues

This commit is contained in:
Kristóf Tóth 2019-08-28 16:40:23 +02:00
parent c1df007d6c
commit 016130b081
7 changed files with 14 additions and 6 deletions

View File

@ -6,7 +6,7 @@ disable = missing-docstring, too-few-public-methods, invalid-name
[SIMILARITIES]
min-similarity-lines=7
min-similarity-lines=8
ignore-comments=yes
ignore-docstrings=yes
ignore-imports=yes

View File

@ -7,6 +7,7 @@ class DeployHandler:
keys = ['deploy.start', 'process.restart']
def __init__(self, process_name='webservice'):
self.connector = None
self.process_name = process_name
self.commands = {
@ -20,7 +21,7 @@ class DeployHandler:
except KeyError:
LOG.error('IGNORING MESSAGE: Invalid message received: %s', message)
def handle_deploy(self, message):
def handle_deploy(self, _):
self.connector.send_message({
'key': 'process.restart',
'name': self.process_name

View File

@ -2,7 +2,7 @@ from stat import S_ISFIFO
from os import access, mkdir, stat, R_OK
from os.path import exists
from pipe_io_server import PipeReaderServer, PipeWriterServer
from pipe_io_server import PipeWriterServer
from tfw.internals.inotify import InotifyObserver, InotifyFileCreatedEvent, InotifyFileDeletedEvent

View File

@ -8,9 +8,8 @@ from os.path import join
from pathlib import Path
from tempfile import TemporaryDirectory
from tfw.internals.inotify import InotifyFileCreatedEvent, InotifyFileDeletedEvent
import pytest
from tfw.internals.inotify import InotifyFileCreatedEvent, InotifyFileDeletedEvent
from .pipe_connector import PipeConnector
from .proxy_pipe_connector_handler import ProxyPipeConnector

View File

@ -1,2 +1,8 @@
# pylint: disable=unused-import
from tfw.internals.event_handling import EventHandler, ControlEventHandler, FSMAwareEventHandler, SignedEventHandler, SignedControlEventHandler
from tfw.internals.event_handling import (
EventHandler,
ControlEventHandler,
FSMAwareEventHandler,
SignedEventHandler,
SignedControlEventHandler
)

View File

@ -13,6 +13,7 @@ class EventHandler:
self.handle_event(message, self.connector)
def _validate_message(self, message):
# pylint: disable=unused-argument,no-self-use
return True
def handle_event(self, message, connector):

View File

@ -2,6 +2,7 @@ from .control_event_handler import ControlEventHandler
from .signed_event_handler import SignedEventHandler
class SignedControlEventHandler(ControlEventHandler, SignedEventHandler):
# pylint: disable=abstract-method
def _validate_message(self, message):
return (
ControlEventHandler._validate_message(self, message) and