Skip to content

Commit

Permalink
removing noqa: W504
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Lautman authored and Mike Lautman committed Nov 19, 2018
1 parent e13b9f2 commit ac9c660
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions rosidl_generator_py/resource/_msg.py.em
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated from rosidl_generator_py/resource/_msg.py.em # noqa: W504
# generated from rosidl_generator_py/resource/_msg.py.em
# generated code does not contain a copyright notice

@#######################################################################
Expand Down Expand Up @@ -235,26 +235,26 @@ if field.name in dict(inspect.getmembers(builtins)).keys():
@[ end if]@
assert \
@[ if field.type.is_array]@
((isinstance(value, Sequence) or # noqa: W504
isinstance(value, Set) or # noqa: W504
isinstance(value, UserList)) and # noqa: W504
not isinstance(value, str) and # noqa: W504
not isinstance(value, UserString) and # noqa: W504
((isinstance(value, Sequence) or
isinstance(value, Set) or
isinstance(value, UserList)) and
not isinstance(value, str) and
not isinstance(value, UserString) and
@{assert_msg_suffixes = ['a set or sequence']}@
@[ if field.type.type == 'string' and field.type.string_upper_bound]@
all(len(val) <= @field.type.string_upper_bound for val in value) and # noqa: W504
all(len(val) <= @field.type.string_upper_bound for val in value) and
@{assert_msg_suffixes.append('and each string value not longer than %d' % field.type.string_upper_bound)}@
@[ end if]@
@[ if field.type.array_size]@
@[ if field.type.is_upper_bound]@
len(value) <= @(field.type.array_size) and # noqa: W504
len(value) <= @(field.type.array_size) and
@{assert_msg_suffixes.insert(1, 'with length <= %d' % field.type.array_size)}@
@[ else]@
len(value) == @(field.type.array_size) and # noqa: W504
len(value) == @(field.type.array_size) and
@{assert_msg_suffixes.insert(1, 'with length %d' % field.type.array_size)}@
@[ end if]@
@[ end if]@
all(isinstance(v, @(get_python_type(field.type))) for v in value) and # noqa: W504
all(isinstance(v, @(get_python_type(field.type))) for v in value) and
@{assert_msg_suffixes.append("and each value of type '%s'" % get_python_type(field.type))}@
@[ if field.type.type.startswith('int')]@
@{
Expand Down Expand Up @@ -286,11 +286,11 @@ bound = 2**nbits
isinstance(value, @(field.type.type)), \
"The '@(field.name)' field must be a sub message of type '@(field.type.type)'"
@[ elif field.type.type == 'byte']@
((isinstance(value, bytes) or isinstance(value, ByteString)) and # noqa: W504
((isinstance(value, bytes) or isinstance(value, ByteString)) and
len(value) == 1), \
"The '@(field.name)' field must of type 'bytes' or 'ByteString' with a length 1"
@[ elif field.type.type == 'char']@
((isinstance(value, str) or isinstance(value, UserString)) and # noqa: W504
((isinstance(value, str) or isinstance(value, UserString)) and
len(value) == 1 and ord(value) >= -128 and ord(value) < 128), \
"The '@(field.name)' field must of type 'str' or 'UserString' " \
'with a length 1 and the character ord() in [-128, 127]'
Expand Down

0 comments on commit ac9c660

Please sign in to comment.