Index: mojo/public/tools/bindings/generators/mojom_dart_generator.py |
diff --git a/mojo/public/tools/bindings/generators/mojom_dart_generator.py b/mojo/public/tools/bindings/generators/mojom_dart_generator.py |
index 849e6afa7f5f792aea72da83243f041c097765dc..3aceb135a7a28ce93362c43d0d2a86e5cf167229 100644 |
--- a/mojo/public/tools/bindings/generators/mojom_dart_generator.py |
+++ b/mojo/public/tools/bindings/generators/mojom_dart_generator.py |
@@ -319,26 +319,26 @@ def GetDartTrueFalse(value): |
return 'true' if value else 'false' |
def GetArrayNullabilityFlags(kind): |
- """Returns nullability flags for an array type, see codec.dart. |
- |
- As we have dedicated decoding functions for arrays, we have to pass |
- nullability information about both the array itself, as well as the array |
- element type there. |
- """ |
- assert mojom.IsArrayKind(kind) |
- ARRAY_NULLABLE = 'bindings.kArrayNullable' |
- ELEMENT_NULLABLE = 'bindings.kElementNullable' |
- NOTHING_NULLABLE = 'bindings.kNothingNullable' |
- |
- flags_to_set = [] |
- if mojom.IsNullableKind(kind): |
- flags_to_set.append(ARRAY_NULLABLE) |
- if mojom.IsNullableKind(kind.kind): |
- flags_to_set.append(ELEMENT_NULLABLE) |
- |
- if not flags_to_set: |
- flags_to_set = [NOTHING_NULLABLE] |
- return ' | '.join(flags_to_set) |
+ """Returns nullability flags for an array type, see codec.dart. |
+ |
+ As we have dedicated decoding functions for arrays, we have to pass |
+ nullability information about both the array itself, as well as the array |
+ element type there. |
+ """ |
+ assert mojom.IsArrayKind(kind) |
+ ARRAY_NULLABLE = 'bindings.kArrayNullable' |
+ ELEMENT_NULLABLE = 'bindings.kElementNullable' |
+ NOTHING_NULLABLE = 'bindings.kNothingNullable' |
+ |
+ flags_to_set = [] |
+ if mojom.IsNullableKind(kind): |
+ flags_to_set.append(ARRAY_NULLABLE) |
+ if mojom.IsNullableKind(kind.kind): |
+ flags_to_set.append(ELEMENT_NULLABLE) |
+ |
+ if not flags_to_set: |
+ flags_to_set = [NOTHING_NULLABLE] |
+ return ' | '.join(flags_to_set) |
def AppendDecodeParams(initial_params, kind, bit): |
""" Appends standard parameters for decode calls. """ |