Fixes for flake8 compatibility
This commit is contained in:
parent
e6e82ebc62
commit
04fae79022
|
@ -42,6 +42,7 @@ headers = {
|
|||
'User-Agent': 'python-monascaclient',
|
||||
'Content-Type': 'application/json'}
|
||||
|
||||
|
||||
def test_events_get():
|
||||
|
||||
body = {}
|
||||
|
@ -188,4 +189,3 @@ test_stream_definition_get()
|
|||
test_stream_definition_delete()
|
||||
test_events_get_all()
|
||||
test_transforms()
|
||||
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
|
||||
|
||||
class MessageQueueException(Exception):
|
||||
pass
|
||||
pass
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
|
||||
|
||||
def transform(events, tenant_id, region):
|
||||
raise NotImplemented()
|
||||
raise NotImplemented()
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
|
||||
|
||||
def transform(metrics, tenant_id, region):
|
||||
raise NotImplemented()
|
||||
raise NotImplemented()
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
|
||||
|
||||
class TransformationException(Exception):
|
||||
pass
|
||||
pass
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
|
||||
|
||||
def transform(events, tenant_id, region):
|
||||
return events
|
||||
return events
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
|
||||
|
||||
def transform(metrics, tenant_id, region):
|
||||
return metrics
|
||||
return metrics
|
||||
|
|
|
@ -25,4 +25,4 @@ def transform(event, tenant_id, region):
|
|||
creation_time=timeutils.utcnow_ts()
|
||||
)
|
||||
|
||||
return transformed_event
|
||||
return transformed_event
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
def transform(transform_id, tenant_id, event):
|
||||
transformed_event = dict(
|
||||
transform_definition=event,
|
||||
|
|
|
@ -25,4 +25,4 @@ class Publisher(object):
|
|||
|
||||
:param message: Message to send.
|
||||
"""
|
||||
return
|
||||
return
|
||||
|
|
|
@ -26,5 +26,5 @@ db = peewee.MySQLDatabase(cfg.CONF.mysql.database_name,
|
|||
|
||||
|
||||
class Model(peewee.Model):
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
database = db
|
||||
|
|
|
@ -16,8 +16,8 @@ import MySQLdb
|
|||
from oslo_log import log
|
||||
from oslo_utils import timeutils
|
||||
|
||||
from monasca_events_api.common.repositories import transforms_repository
|
||||
from monasca_events_api.common.repositories.mysql import mysql_repository
|
||||
from monasca_events_api.common.repositories import transforms_repository
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
@ -42,7 +42,7 @@ class TransformsRepository(mysql_repository.MySQLRepository,
|
|||
values (%s, %s, %s, %s, %s, %s, %s, %s)""",
|
||||
(id, tenant_id, name, description,
|
||||
specification, enabled, now, now))
|
||||
except MySQLdb.IntegrityError, e:
|
||||
except MySQLdb.IntegrityError as e:
|
||||
code, msg = e
|
||||
if code == 1062:
|
||||
MySQLdb.AlreadyExistsException(
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import json
|
||||
import datetime
|
||||
import json
|
||||
from time import mktime
|
||||
|
||||
import falcon
|
||||
|
@ -25,13 +25,13 @@ import simport
|
|||
|
||||
from monasca_events_api.api import transforms_api_v2
|
||||
from monasca_events_api.common.messaging import exceptions as message_queue_exceptions
|
||||
from monasca_events_api.common.messaging.message_formats.reference.transforms import (
|
||||
transform as transform_event)
|
||||
from monasca_events_api.common.repositories import exceptions as repository_exceptions
|
||||
from monasca_events_api.v2.common import helpers
|
||||
from monasca_events_api.v2.common.schemas import (exceptions as schemas_exceptions)
|
||||
from monasca_events_api.v2.common.schemas import (
|
||||
transforms_request_body_schema as schemas_transforms)
|
||||
from monasca_events_api.common.messaging.message_formats.reference.transforms import (
|
||||
transform as transform_event)
|
||||
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
|
Loading…
Reference in New Issue