mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-12-03 17:41:32 +00:00
Fix pylint issues
This commit is contained in:
parent
c1df007d6c
commit
016130b081
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
)
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user