Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Unified Diff: tools/json_schema_compiler/dart_generator.py

Issue 23549025: Clean up JSON Schema Compiler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed enum test and added blank lines. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/json_schema_compiler/cpp_util.py ('k') | tools/json_schema_compiler/dart_generator_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/dart_generator.py
diff --git a/tools/json_schema_compiler/dart_generator.py b/tools/json_schema_compiler/dart_generator.py
index 3a4c2e33c10a9044962a0e32f88af65d4584e5b3..a9ba0d6ee81193aab1a810ca38d47ba1817899cd 100644
--- a/tools/json_schema_compiler/dart_generator.py
+++ b/tools/json_schema_compiler/dart_generator.py
@@ -6,8 +6,8 @@ Generator language component for compiler.py that adds Dart language support.
"""
from code import Code
-from model import *
-from schema_util import *
+from model import Function, PropertyType
+from schema_util import StripNamespace
import os
from datetime import datetime
@@ -25,6 +25,7 @@ class DartGenerator(object):
def Generate(self, namespace):
return _Generator(namespace, self._dart_overrides_dir).Generate()
+
class _Generator(object):
"""A .dart generator for a namespace.
"""
@@ -278,9 +279,9 @@ class _Generator(object):
c.Concat(self._GenerateDocumentation(f))
if not self._NeedsProxiedCallback(f):
- c.Append("%s => %s;" % (self._GenerateFunctionSignature(f),
- self._GenerateProxyCall(f)))
- return c
+ c.Append("%s => %s;" % (self._GenerateFunctionSignature(f),
+ self._GenerateProxyCall(f)))
+ return c
(c.Sblock("%s {" % self._GenerateFunctionSignature(f))
.Concat(self._GenerateProxiedFunction(f.callback, f.callback.name))
« no previous file with comments | « tools/json_schema_compiler/cpp_util.py ('k') | tools/json_schema_compiler/dart_generator_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698