Fix remaining flake8 issues
Disabling W504 and W605 for now as there are too many instances.
This commit is contained in:
parent
18173a5951
commit
84fb52d0a2
@ -1,5 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
import logging
|
||||
# import logging
|
||||
# logging.getLogger('boto').setLevel(logging.CRITICAL)
|
||||
|
||||
__title__ = 'moto'
|
||||
|
@ -96,11 +96,11 @@ class CloudWatchResponse(BaseResponse):
|
||||
extended_statistics = self._get_param('ExtendedStatistics')
|
||||
dimensions = self._get_param('Dimensions')
|
||||
if unit or extended_statistics or dimensions:
|
||||
raise NotImplemented()
|
||||
raise NotImplementedError()
|
||||
|
||||
# TODO: this should instead throw InvalidParameterCombination
|
||||
if not statistics:
|
||||
raise NotImplemented("Must specify either Statistics or ExtendedStatistics")
|
||||
raise NotImplementedError("Must specify either Statistics or ExtendedStatistics")
|
||||
|
||||
datapoints = self.cloudwatch_backend.get_metric_statistics(namespace, metric_name, start_time, end_time, period, statistics)
|
||||
template = self.response_template(GET_METRIC_STATISTICS_TEMPLATE)
|
||||
|
@ -1,7 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
import re
|
||||
import six
|
||||
import re
|
||||
from collections import deque
|
||||
from collections import namedtuple
|
||||
|
||||
@ -221,7 +219,6 @@ class ConditionExpressionParser:
|
||||
# --------------
|
||||
LITERAL = 'LITERAL'
|
||||
|
||||
|
||||
class Nonterminal:
|
||||
"""Enum defining nonterminals for productions."""
|
||||
|
||||
@ -240,7 +237,6 @@ class ConditionExpressionParser:
|
||||
RIGHT_PAREN = 'RIGHT_PAREN'
|
||||
WHITESPACE = 'WHITESPACE'
|
||||
|
||||
|
||||
Node = namedtuple('Node', ['nonterminal', 'kind', 'text', 'value', 'children'])
|
||||
|
||||
def _lex_condition_expression(self):
|
||||
@ -290,7 +286,6 @@ class ConditionExpressionParser:
|
||||
raise ValueError("Cannot parse condition starting at: " +
|
||||
remaining_expression)
|
||||
|
||||
value = match_text
|
||||
node = self.Node(
|
||||
nonterminal=nonterminal,
|
||||
kind=self.Kind.LITERAL,
|
||||
@ -351,7 +346,6 @@ class ConditionExpressionParser:
|
||||
'size',
|
||||
}
|
||||
|
||||
|
||||
if name.lower() in reserved:
|
||||
# e.g. AND
|
||||
nonterminal = reserved[name.lower()]
|
||||
@ -755,7 +749,6 @@ class ConditionExpressionParser:
|
||||
else: # pragma: no cover
|
||||
raise ValueError("Unknown operand: %r" % node)
|
||||
|
||||
|
||||
def _make_op_condition(self, node):
|
||||
if node.kind == self.Kind.OR:
|
||||
lhs, rhs = node.children
|
||||
|
Loading…
x
Reference in New Issue
Block a user