mirror of
https://github.com/dart-lang/sdk
synced 2024-09-30 04:08:32 +00:00
Spelling tools
Closes https://github.com/dart-lang/sdk/pull/50773 GitOrigin-RevId: 8f729bf80cce3c39b788a61591f14db234297186 Change-Id: I5a07bf96a2f8920560983fda504000c39e598e05 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276560 Reviewed-by: Srujan Gaddam <srujzs@google.com> Reviewed-by: Jonas Termansen <sortie@google.com> Reviewed-by: Erik Ernst <eernst@google.com>
This commit is contained in:
parent
60a8ba16de
commit
b48dc3af7a
|
@ -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'
|
||||
|
|
|
@ -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).');
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -212,14 +212,14 @@ List<CommonGroup> buildCommonGroups(String commitA, String commitB,
|
|||
while (h < diffs.length) {
|
||||
final d = diffs[h++];
|
||||
final builders = <String>{}..add(d.builder);
|
||||
final gropupDiffs = <Diff>[d];
|
||||
final groupDiffs = <Diff>[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<CommonGroup> 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 = <String, List<GroupedDiff>>{};
|
||||
|
|
|
@ -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.",
|
||||
|
|
|
@ -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')",
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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'])
|
||||
|
||||
|
|
|
@ -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 []
|
||||
|
||||
|
|
|
@ -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*(?:'
|
||||
|
|
Loading…
Reference in a new issue