mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-12-04 08:21:31 +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]
|
[SIMILARITIES]
|
||||||
|
|
||||||
min-similarity-lines=7
|
min-similarity-lines=8
|
||||||
ignore-comments=yes
|
ignore-comments=yes
|
||||||
ignore-docstrings=yes
|
ignore-docstrings=yes
|
||||||
ignore-imports=yes
|
ignore-imports=yes
|
||||||
|
@ -7,6 +7,7 @@ class DeployHandler:
|
|||||||
keys = ['deploy.start', 'process.restart']
|
keys = ['deploy.start', 'process.restart']
|
||||||
|
|
||||||
def __init__(self, process_name='webservice'):
|
def __init__(self, process_name='webservice'):
|
||||||
|
self.connector = None
|
||||||
self.process_name = process_name
|
self.process_name = process_name
|
||||||
|
|
||||||
self.commands = {
|
self.commands = {
|
||||||
@ -20,7 +21,7 @@ class DeployHandler:
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
LOG.error('IGNORING MESSAGE: Invalid message received: %s', message)
|
LOG.error('IGNORING MESSAGE: Invalid message received: %s', message)
|
||||||
|
|
||||||
def handle_deploy(self, message):
|
def handle_deploy(self, _):
|
||||||
self.connector.send_message({
|
self.connector.send_message({
|
||||||
'key': 'process.restart',
|
'key': 'process.restart',
|
||||||
'name': self.process_name
|
'name': self.process_name
|
||||||
|
@ -2,7 +2,7 @@ from stat import S_ISFIFO
|
|||||||
from os import access, mkdir, stat, R_OK
|
from os import access, mkdir, stat, R_OK
|
||||||
from os.path import exists
|
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
|
from tfw.internals.inotify import InotifyObserver, InotifyFileCreatedEvent, InotifyFileDeletedEvent
|
||||||
|
|
||||||
|
@ -8,9 +8,8 @@ from os.path import join
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from tempfile import TemporaryDirectory
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
from tfw.internals.inotify import InotifyFileCreatedEvent, InotifyFileDeletedEvent
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from tfw.internals.inotify import InotifyFileCreatedEvent, InotifyFileDeletedEvent
|
||||||
|
|
||||||
from .pipe_connector import PipeConnector
|
from .pipe_connector import PipeConnector
|
||||||
from .proxy_pipe_connector_handler import ProxyPipeConnector
|
from .proxy_pipe_connector_handler import ProxyPipeConnector
|
||||||
|
@ -1,2 +1,8 @@
|
|||||||
# pylint: disable=unused-import
|
# 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)
|
self.handle_event(message, self.connector)
|
||||||
|
|
||||||
def _validate_message(self, message):
|
def _validate_message(self, message):
|
||||||
|
# pylint: disable=unused-argument,no-self-use
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def handle_event(self, message, connector):
|
def handle_event(self, message, connector):
|
||||||
|
@ -2,6 +2,7 @@ from .control_event_handler import ControlEventHandler
|
|||||||
from .signed_event_handler import SignedEventHandler
|
from .signed_event_handler import SignedEventHandler
|
||||||
|
|
||||||
class SignedControlEventHandler(ControlEventHandler, SignedEventHandler):
|
class SignedControlEventHandler(ControlEventHandler, SignedEventHandler):
|
||||||
|
# pylint: disable=abstract-method
|
||||||
def _validate_message(self, message):
|
def _validate_message(self, message):
|
||||||
return (
|
return (
|
||||||
ControlEventHandler._validate_message(self, message) and
|
ControlEventHandler._validate_message(self, message) and
|
||||||
|
Loading…
Reference in New Issue
Block a user