diff --git a/tools/bots/bot_utils.py b/tools/bots/bot_utils.py index 0b8270111ba..653e7cee89c 100755 --- a/tools/bots/bot_utils.py +++ b/tools/bots/bot_utils.py @@ -109,7 +109,7 @@ class GCSNamer(object): else: self.bucket = 'gs://dart-archive' - # Functions for quering complete gs:// filepaths + # Functions for querying complete gs:// filepaths def version_filepath(self, revision): return '%s/channels/%s/%s/%s/VERSION' % (self.bucket, self.channel, @@ -156,7 +156,7 @@ class GCSNamer(object): def _variant_directory(self, name, revision): return '%s/%s' % (self.base_directory(revision), name) - # Functions for quering filenames + # Functions for querying filenames def dartdocs_zipfilename(self): return 'dartdocs-gen-api.zip' diff --git a/tools/bots/update_blamelists.dart b/tools/bots/update_blamelists.dart index 7956090a3d5..5f16bec91ba 100644 --- a/tools/bots/update_blamelists.dart +++ b/tools/bots/update_blamelists.dart @@ -140,7 +140,7 @@ void updateBlameLists(String configuration, String commit, result.blamelistStartIndex = newStartIndex; var updateIndex = Update(['blamelist_start_index'], result.data); if (!await database.commit(writes: [updateIndex])) { - // Commiting the change to the database had a conflict, retry. + // Committing the change to the database had a conflict, retry. needsRetry = true; if (++attempts == maxAttempts) { throw Exception('Exceeded maximum retry attempts ($maxAttempts).'); diff --git a/tools/buildtools/update.py b/tools/buildtools/update.py index ebdec737404..b7a7510825f 100755 --- a/tools/buildtools/update.py +++ b/tools/buildtools/update.py @@ -76,7 +76,7 @@ def LinksForGitCLFormat(): def main(argv): arch_id = platform.machine() # Don't try to download binaries if we're on an arm machine unless it is a - # Mac arm machine because the x64 binaries work using rossetta translation. + # Mac arm machine because the x64 binaries work using rosetta translation. if ((arch_id.startswith('arm') and sys.platform != 'darwin') or arch_id.startswith('aarch64')): print('Not downloading buildtools binaries for ' + arch_id) diff --git a/tools/diff_results.dart b/tools/diff_results.dart index fa280c6694c..3c2331a7015 100644 --- a/tools/diff_results.dart +++ b/tools/diff_results.dart @@ -212,14 +212,14 @@ List buildCommonGroups(String commitA, String commitB, while (h < diffs.length) { final d = diffs[h++]; final builders = {}..add(d.builder); - final gropupDiffs = [d]; + final groupDiffs = [d]; while (h < diffs.length) { final nd = diffs[h]; if (d.test == nd.test) { if (d.sameExpectationDifferenceAs(nd)) { builders.add(nd.builder); - gropupDiffs.add(nd); + groupDiffs.add(nd); h++; continue; } @@ -227,7 +227,7 @@ List buildCommonGroups(String commitA, String commitB, break; } - groups.add(GroupedDiff(d.test, builders.toList()..sort(), gropupDiffs)); + groups.add(GroupedDiff(d.test, builders.toList()..sort(), groupDiffs)); } final commonGroups = >{}; diff --git a/tools/dom/docs.json b/tools/dom/docs.json index 45bd2a4f9be..e7730fc03bf 100644 --- a/tools/dom/docs.json +++ b/tools/dom/docs.json @@ -3817,7 +3817,7 @@ " * ## Other resources", " *", " * * [Measuring page load speed with navigation", - " * timeing](http://www.html5rocks.com/en/tutorials/webperformance/basics/)", + " * timing](http://www.html5rocks.com/en/tutorials/webperformance/basics/)", " * from HTML5Rocks.", " * * [Navigation timing", " * specification](http://www.w3.org/TR/navigation-timing/) from W3C.", diff --git a/tools/dom/scripts/dartmetadata.py b/tools/dom/scripts/dartmetadata.py index 35e770c675e..94881c2f889 100644 --- a/tools/dom/scripts/dartmetadata.py +++ b/tools/dom/scripts/dartmetadata.py @@ -79,7 +79,7 @@ _dart2js_annotations = monitored.Dict( "@Returns('NodeList|HtmlCollection')", ], - # querysSelectorAll never returns `null`. + # querySelectorAll never returns `null`. 'Document.querySelectorAll': [ "@Creates('NodeList')", "@Returns('NodeList')", diff --git a/tools/dom/scripts/database.py b/tools/dom/scripts/database.py index 2ff5dc26961..65544ade526 100755 --- a/tools/dom/scripts/database.py +++ b/tools/dom/scripts/database.py @@ -65,7 +65,7 @@ class Database(object): self._all_interfaces = {} def _ScanForInterfaces(self): - """Iteratores over the database files and lists all interface names. + """Iterates over the database files and lists all interface names. Return: A list of interface names. diff --git a/tools/dom/scripts/databasebuilder.py b/tools/dom/scripts/databasebuilder.py index c6180843ae8..d245d282d81 100755 --- a/tools/dom/scripts/databasebuilder.py +++ b/tools/dom/scripts/databasebuilder.py @@ -505,7 +505,7 @@ class DatabaseBuilder(object): return changed def _merge_impl_stmt(self, impl_stmt, import_options): - """Applies "X implements Y" statemetns on the proper places in the + """Applies "X implements Y" statements on the proper places in the database""" implementor_name = impl_stmt.implementor.id implemented_name = impl_stmt.implemented.id diff --git a/tools/dom/scripts/emitter.py b/tools/dom/scripts/emitter.py index 21f4a17c3b7..55e331358f4 100755 --- a/tools/dom/scripts/emitter.py +++ b/tools/dom/scripts/emitter.py @@ -49,7 +49,7 @@ class Emitter(object): corresponding emitter. Subtemplates can be created by using $#NAME(...), where text can be placed - inside of the parentheses and will conditionally expand depdending on if + inside of the parentheses and will conditionally expand depending on if NAME is set to True or False. The text inside the parentheses may use further $#NAME and $NAME substitutions, but is not permitted to create holes. diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py index 15cc0f9357b..9b58a3c1110 100644 --- a/tools/dom/scripts/htmldartgenerator.py +++ b/tools/dom/scripts/htmldartgenerator.py @@ -536,7 +536,7 @@ class HtmlDartGenerator(object): return mixins def AddConstructors(self, constructors, factory_name, - factory_constructor_name, emmiter): + factory_constructor_name, emitter): """ Adds all of the constructors. Arguments: constructors - List of the constructors to be added. @@ -544,15 +544,15 @@ class HtmlDartGenerator(object): factory_constructor_name - The name of the constructor on the factory_name to call (calls an autogenerated FactoryProvider if unspecified) - emmiter - Emmiter used to emit constructors when generating classes + emitter - Emitter used to emit constructors when generating classes using the static extension pattern. """ for constructor_info in constructors: self._AddConstructor(constructor_info, factory_name, - factory_constructor_name, emmiter) + factory_constructor_name, emitter) def _AddConstructor(self, constructor_info, factory_name, - factory_constructor_name, emmiter): + factory_constructor_name, emitter): # Hack to ignore the constructor used by JavaScript. if ((self._interface.id == 'HTMLImageElement' or self._interface.id == 'Blob' or @@ -566,7 +566,7 @@ class HtmlDartGenerator(object): metadata = self._metadata.GetFormattedMetadata( self._library_name, self._interface, self._interface.id, ' ') - target_emitter = emmiter if emmiter else self._members_emitter + target_emitter = emitter if emitter else self._members_emitter if not factory_constructor_name: factory_constructor_name = '_create' @@ -669,7 +669,7 @@ class HtmlDartGenerator(object): FACTORY_NAME=qualified_name, FACTORY_PARAMS=args) self.EmitStaticFactoryOverload(constructor_info, name, - arguments, emmiter) + arguments, emitter) def IsOptional(signature_index, argument): return self.IsConstructorArgumentOptional(argument) @@ -817,13 +817,13 @@ class HtmlDartGenerator(object): FUTURE_GENERIC=future_generic, ORIGINAL_FUNCTION=html_name) - def EmitHelpers(self, base_class, emmiter): - if (not self._members_emitter) and (not emmiter): + def EmitHelpers(self, base_class, emitter): + if (not self._members_emitter) and (not emitter): return if self._interface.id not in custom_html_constructors: - target_emmiter = emmiter if emmiter else self._members_emitter - target_emmiter.Emit( + target_emitter = emitter if emitter else self._members_emitter + target_emitter.Emit( ' // To suppress missing implicit constructor warnings.\n' ' factory $CLASSNAME._() { ' 'throw new UnsupportedError("Not supported"); }\n', diff --git a/tools/dom/scripts/idlsync.py b/tools/dom/scripts/idlsync.py index f95c0b9c0bd..7298337a4e7 100755 --- a/tools/dom/scripts/idlsync.py +++ b/tools/dom/scripts/idlsync.py @@ -340,7 +340,7 @@ def getCurrentDartSHA(): return dart_sha -# Returns the SHA of the Dartium/Chromiun in the DEPS file. +# Returns the SHA of the Dartium/Chromium in the DEPS file. def GetDEPSWebCoreGitRevision(deps, component): """Returns a tuple with the (dartium chromium repo, latest revision).""" foundIt = re.search(WEBKIT_SHA_PATTERN, deps) diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py index 4ea618762ea..f1d801f83ea 100644 --- a/tools/dom/scripts/systemhtml.py +++ b/tools/dom/scripts/systemhtml.py @@ -755,7 +755,7 @@ class HtmlDartInterfaceGenerator(object): class_modifiers = '' else: # For Dartium w/ JsInterop these suppressed interfaces are needed to - # instanciate the internal classes. + # instantiate the internal classes. if (self._renamer.ShouldSuppressInterface(self._interface) and not (isinstance(self._backend, Dart2JSBackend)) and self._options.dart_js_interop): @@ -840,7 +840,7 @@ class HtmlDartInterfaceGenerator(object): implementation_members_emitter = \ implementation_members_emitter[2] - # We add special emmiters for classes migrated to static type extensions + # We add special emitters for classes migrated to static type extensions elif (len(implementation_members_emitter) == 2): class_members_emitter = \ implementation_members_emitter[0] @@ -1394,7 +1394,7 @@ class Dart2JSBackend(HtmlDartGenerator): return argument.optional def EmitStaticFactoryOverload(self, constructor_info, name, arguments, - emmiter): + emitter): if self._interface_type_info.has_generated_interface(): # Use dart_type name, we're generating. interface_name = self._interface_type_info.interface_name() @@ -1406,7 +1406,7 @@ class Dart2JSBackend(HtmlDartGenerator): arguments = constructor_info.ParametersAsArgumentList(index) if arguments: arguments = ', ' + arguments - (emmiter if (emmiter != None) else self._members_emitter).Emit( + (emitter if (emitter != None) else self._members_emitter).Emit( " static $INTERFACE_NAME $NAME($PARAMETERS) => " "JS('$INTERFACE_NAME', 'new $CTOR_NAME($PLACEHOLDERS)'$ARGUMENTS);\n", INTERFACE_NAME=interface_name, diff --git a/tools/dom/scripts/templateloader.py b/tools/dom/scripts/templateloader.py index 7e69a8e4fcd..2a95cd72f4a 100644 --- a/tools/dom/scripts/templateloader.py +++ b/tools/dom/scripts/templateloader.py @@ -26,7 +26,7 @@ class TemplateLoader(object): Args: root - a string, the directory under which the templates are stored. subpaths - a list of strings, subpaths of root in search order. - conditions - a dictionay from strings to booleans. Any conditional + conditions - a dictionary from strings to booleans. Any conditional expression must be a key in the map. """ self._root = root diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart index 2400619e263..f4472b87b7d 100644 --- a/tools/dom/src/native_DOMImplementation.dart +++ b/tools/dom/src/native_DOMImplementation.dart @@ -321,7 +321,7 @@ class _Utils { try { return new DateTime.fromMillisecondsSinceEpoch(dateTime.toInt()); } catch (_) { - // TODO(antonnm): treat exceptions properly in bindings and + // TODO(antonm): treat exceptions properly in bindings and // find out how to treat NaNs. return null; } diff --git a/tools/linux_dist_support/linux_distribution_support.py b/tools/linux_dist_support/linux_distribution_support.py index 1b722783bb9..a2acab94d9f 100644 --- a/tools/linux_dist_support/linux_distribution_support.py +++ b/tools/linux_dist_support/linux_distribution_support.py @@ -112,7 +112,7 @@ def SrcSteps(): sys.executable, 'tools/build.py', '--no-goma', '--mode=release', '--arch=x64', 'runtime' ]) - # Copy in the installed binary to avoid poluting /usr/bin (and having to + # Copy in the installed binary to avoid polluting /usr/bin (and having to # run as root) Run(['cp', '/usr/bin/dart', 'out/ReleaseX64/dart']) diff --git a/tools/utils.py b/tools/utils.py index aeb40afa385..e06d07ad811 100644 --- a/tools/utils.py +++ b/tools/utils.py @@ -939,7 +939,7 @@ class BaseCoreDumpArchiver(object): def _find_all_coredumps(self): """Return coredumps that were recorded (if supported by the platform). - This method will be overriden by concrete platform specific implementations. + This method will be overridden by concrete platform specific implementations. """ return [] diff --git a/tools/verify_docs/bin/verify_docs.dart b/tools/verify_docs/bin/verify_docs.dart index 85bcdf78860..4050bb77992 100755 --- a/tools/verify_docs/bin/verify_docs.dart +++ b/tools/verify_docs/bin/verify_docs.dart @@ -221,7 +221,7 @@ class ValidateCommentCodeSamplesVisitor extends GeneralizingAstVisitor { // instead of writing them explicitly to. // // Captures: - // 1/libdecl: Non-null if mathcing a `library` declaration. + // 1/libdecl: Non-null if matching a `library` declaration. // 2: Internal use, quote around import URI. // 3/importuri: Import URI. final _toplevelDeclarationRE = RegExp(r'^\s*(?:'