Commits

Kirill Simonov committed 2b54ecd

Fixed a typo.

Comments (0)

Files changed (3)

src/htsql/tr/bind.py

                 self.state.push_scope(scope)
             # Extract nested selectors, if any.
             bindings = []
-            recipies = expand(binding, is_hard=False)
-            if recipies is not None:
+            recipes = expand(binding, is_hard=False)
+            if recipes is not None:
                 seed = binding
-                for syntax, recipe in recipies:
+                for syntax, recipe in recipes:
                     binding = self.state.use(recipe, syntax)
                     binding = RescopingBinding(binding, seed, binding.syntax)
                     bindings.append(binding)
 
     def __call__(self):
         # Get all public columns in the current lookup scope.
-        recipies = expand(self.state.scope)
-        if recipies is None:
+        recipes = expand(self.state.scope)
+        if recipes is None:
             raise BindError("cannot expand '*' since output columns"
                             " are not defined", self.syntax.mark)
         # If a position is given, extract a specific element.
                 raise BindError("an integer value is required",
                                 self.syntax.mark)
             index -= 1
-            if not (0 <= index < len(recipies)):
+            if not (0 <= index < len(recipes)):
                 raise BindError("value in range 1-%s is required"
-                                % len(recipies), self.syntax.mark)
-            syntax, recipe = recipies[index]
+                                % len(recipes), self.syntax.mark)
+            syntax, recipe = recipes[index]
             syntax = syntax.clone(mark=self.syntax.mark)
             return self.state.use(recipe, syntax)
         # Otherwise, generate a selection node.
         elements = []
-        for syntax, recipe in recipies:
+        for syntax, recipe in recipes:
             syntax = syntax.clone(mark=self.syntax.mark)
             element = self.state.use(recipe, syntax)
             elements.append(element)

src/htsql/tr/fn/bind.py

                 elif len(value) == 1:
                     [value] = value
                     bound_value = self.state.bind(value)
-                    recipies = expand(bound_value, is_hard=False)
-                    if slot.is_mandatory and (recipies is not None and
-                                              not recipies):
+                    recipes = expand(bound_value, is_hard=False)
+                    if slot.is_mandatory and (recipes is not None and
+                                              not recipes):
                         raise BindError("at least one element is expected",
                                         value.mark)
-                    if recipies is None:
+                    if recipes is None:
                         bound_value = [bound_value]
                     else:
                         bound_value = []
-                        for syntax, recipe in recipies:
+                        for syntax, recipe in recipes:
                             bound_value.append(self.state.use(recipe, syntax))
                 else:
                     bound_value = []
         elements = []
         for op in ops:
             element = self.state.bind(op)
-            recipies = expand(element, is_hard=False)
-            if recipies is not None:
-                for syntax, recipe in recipies:
+            recipes = expand(element, is_hard=False)
+            if recipes is not None:
+                for syntax, recipe in recipes:
                     if not isinstance(syntax, (IdentifierSyntax, GroupSyntax)):
                         syntax = GroupSyntax(syntax, syntax.mark)
                     syntax = SpecifierSyntax(element.syntax, syntax,
         elements = []
         for op in ops:
             element = self.state.bind(op)
-            recipies = expand(element, is_hard=False)
-            if recipies is not None:
-                for syntax, recipe in recipies:
+            recipes = expand(element, is_hard=False)
+            if recipes is not None:
+                for syntax, recipe in recipes:
                     if not isinstance(syntax, (IdentifierSyntax, GroupSyntax)):
                         syntax = GroupSyntax(syntax, syntax.mark)
                     syntax = SpecifierSyntax(element.syntax, syntax,
         bindings = []
         for item in order:
             binding = self.state.bind(item)
-            recipies = expand(binding, is_hard=False)
-            if recipies is None:
+            recipes = expand(binding, is_hard=False)
+            if recipes is None:
                 domain = coerce(binding.domain)
                 if domain is None:
                     raise BindError("function '%s' expects a scalar"
                 binding = CastBinding(binding, domain, binding.syntax)
                 bindings.append(binding)
             else:
-                for syntax, recipe in recipies:
+                for syntax, recipe in recipes:
                     binding = self.state.use(recipe, syntax)
                     bindings.append(binding)
         return SortBinding(self.state.scope, bindings, None, None, self.syntax)
     polarity = None
 
     def correlate(self, op):
-        recipies = expand(op, is_hard=False)
+        recipes = expand(op, is_hard=False)
         plural_base = None
-        if recipies is not None:
-            if len(recipies) != 1:
+        if recipes is not None:
+            if len(recipes) != 1:
                 raise BindError("function '%s' expects 1 argument; got %s"
-                                % (self.name.encode('utf-8'), len(recipies)),
+                                % (self.name.encode('utf-8'), len(recipes)),
                                 op.mark)
             plural_base = op
-            syntax, recipe = recipies[0]
+            syntax, recipe = recipes[0]
             op = self.state.use(recipe, syntax)
         op = CastBinding(op, coerce(BooleanDomain()), op.syntax)
         return FormulaBinding(self.state.scope,
     hint = """base.count(p) -> the number of p such that p = TRUE"""
 
     def correlate(self, op):
-        recipies = expand(op, is_hard=False)
+        recipes = expand(op, is_hard=False)
         plural_base = None
-        if recipies is not None:
-            if len(recipies) != 1:
+        if recipes is not None:
+            if len(recipes) != 1:
                 raise BindError("function '%s' expects 1 argument; got %s"
-                                % (self.name.encode('utf-8'), len(recipies)),
+                                % (self.name.encode('utf-8'), len(recipes)),
                                 op.mark)
             plural_base = op
-            syntax, recipe = recipies[0]
+            syntax, recipe = recipes[0]
             op = self.state.use(recipe, syntax)
         op = CastBinding(op, coerce(BooleanDomain()), op.syntax)
         op = FormulaBinding(self.state.scope,
     codomain = UntypedDomain()
 
     def correlate(self, op):
-        recipies = expand(op, is_hard=False)
+        recipes = expand(op, is_hard=False)
         plural_base = None
-        if recipies is not None:
-            if len(recipies) != 1:
+        if recipes is not None:
+            if len(recipes) != 1:
                 raise BindError("function '%s' expects 1 argument; got %s"
-                                % (self.name.encode('utf-8'), len(recipies)),
+                                % (self.name.encode('utf-8'), len(recipes)),
                                 op.mark)
             plural_base = op
-            syntax, recipe = recipies[0]
+            syntax, recipe = recipes[0]
             op = self.state.use(recipe, syntax)
         binding = FormulaBinding(self.state.scope,
                                  self.signature(), self.codomain, self.syntax,
     polarity = None
 
     def correlate(self, op):
-        recipies = expand(op, is_hard=False)
+        recipes = expand(op, is_hard=False)
         plural_base = None
-        if recipies is not None:
-            if len(recipies) != 1:
+        if recipes is not None:
+            if len(recipes) != 1:
                 raise BindError("function '%s' expects 1 argument; got %s"
-                                % (self.name.encode('utf-8'), len(recipies)),
+                                % (self.name.encode('utf-8'), len(recipes)),
                                 op.mark)
             plural_base = op
-            syntax, recipe = recipies[0]
+            syntax, recipe = recipes[0]
             op = self.state.use(recipe, syntax)
         binding = FormulaBinding(self.state.scope,
                                  self.signature(self.polarity), self.codomain,

src/htsql/tr/lookup.py

         If set, the function expands classes.
     """
     probe = ExpansionProbe(is_soft=is_soft, is_hard=is_hard)
-    recipies = lookup(binding, probe)
-    if recipies is not None:
-        recipies = list(recipies)
-    return recipies
+    recipes = lookup(binding, probe)
+    if recipes is not None:
+        recipes = list(recipes)
+    return recipes
 
 
 def guess_name(binding):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.