@@ -37,7 +37,7 @@ def _prune_traverse_using_omitted_locations(
3737 Args:
3838 match_traversal: list of MatchStep objects to be pruned
3939 omitted_locations: subset of complex_optional_roots to be omitted
40- complex_optional_roots: list of all @optional locations (location immmediately preceding
40+ complex_optional_roots: list of all @optional locations (location immediately preceding
4141 an @optional traverse) that expand vertex fields
4242 location_to_optional_roots: dict mapping from location -> optional_roots where location is
4343 within some number of @optionals and optional_roots is a list
@@ -64,7 +64,7 @@ def _prune_traverse_using_omitted_locations(
6464 )
6565 )
6666 elif optional_root_location in omitted_locations :
67- # Add filter to indicate that the omitted edge(s) shoud not exist
67+ # Add filter to indicate that the omitted edge(s) should not exist
6868 field_name = step .root_block .get_field_name ()
6969
7070 # HACK(predrag): Plumbing in the type here is tricky and generally not worth it,
@@ -208,7 +208,7 @@ def _get_present_locations(match_traversals):
208208 if not present_non_optional_locations .issubset (present_locations ):
209209 raise AssertionError (
210210 "present_non_optional_locations {} was not a subset of "
211- "present_locations {}. THis hould never happen." .format (
211+ "present_locations {}. This should never happen." .format (
212212 present_non_optional_locations , present_locations
213213 )
214214 )
@@ -354,7 +354,7 @@ def _apply_filters_to_first_location_occurrence(
354354 new_match_traversal = []
355355 newly_filtered_locations = set ()
356356 for match_step in match_traversal :
357- # Apply all filters for a location to the first occurence of that location
357+ # Apply all filters for a location to the first occurrence of that location
358358 current_location = match_step .as_block .location
359359
360360 if current_location in newly_filtered_locations :
@@ -394,8 +394,8 @@ def _apply_filters_to_first_location_occurrence(
394394def collect_filters_to_first_location_occurrence (compound_match_query ):
395395 """Collect all filters for a particular location to the first instance of the location.
396396
397- Adding edge field non-exsistence filters in `_prune_traverse_using_omitted_locations` may
398- result in filters being applied to locations after their first occurence .
397+ Adding edge field non-existence filters in `_prune_traverse_using_omitted_locations` may
398+ result in filters being applied to locations after their first occurrence .
399399 OrientDB does not resolve this behavior correctly. Therefore, for each MatchQuery,
400400 we collect all the filters for each location in a list. For each location,
401401 we make a conjunction of the filter list (`_predicate_list_to_where_block`) and apply
@@ -566,7 +566,7 @@ def _lower_non_existent_context_field_filters(match_traversals, visitor_fn):
566566 The `visitor_fn` implements these behaviors (see `_update_context_field_expression`).
567567
568568 Args:
569- match_traversals: list of match traversal enitities to be lowered
569+ match_traversals: list of match traversal entities to be lowered
570570 visitor_fn: visit_and_update function for lowering expressions in given match traversal
571571
572572 Returns:
@@ -592,7 +592,7 @@ def _lower_non_existent_context_field_filters(match_traversals, visitor_fn):
592592
593593
594594def lower_context_field_expressions (compound_match_query ):
595- """Lower Expressons involving non-existent ContextFields."""
595+ """Lower Expressions involving non-existent ContextFields."""
596596 if len (compound_match_query .match_queries ) == 0 :
597597 raise AssertionError (
598598 "Received CompoundMatchQuery {} with no MatchQuery objects." .format (
@@ -601,7 +601,7 @@ def lower_context_field_expressions(compound_match_query):
601601 )
602602 elif len (compound_match_query .match_queries ) == 1 :
603603 # All ContextFields exist if there is only one MatchQuery
604- # becuase none of the traverses were omitted, and all locations exist (are defined).
604+ # because none of the traverses were omitted, and all locations exist (are defined).
605605 return compound_match_query
606606 else :
607607 new_match_queries = []
0 commit comments