@@ -37,7 +37,7 @@ def _prune_traverse_using_omitted_locations(
37
37
Args:
38
38
match_traversal: list of MatchStep objects to be pruned
39
39
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
41
41
an @optional traverse) that expand vertex fields
42
42
location_to_optional_roots: dict mapping from location -> optional_roots where location is
43
43
within some number of @optionals and optional_roots is a list
@@ -64,7 +64,7 @@ def _prune_traverse_using_omitted_locations(
64
64
)
65
65
)
66
66
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
68
68
field_name = step .root_block .get_field_name ()
69
69
70
70
# HACK(predrag): Plumbing in the type here is tricky and generally not worth it,
@@ -208,7 +208,7 @@ def _get_present_locations(match_traversals):
208
208
if not present_non_optional_locations .issubset (present_locations ):
209
209
raise AssertionError (
210
210
"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 (
212
212
present_non_optional_locations , present_locations
213
213
)
214
214
)
@@ -354,7 +354,7 @@ def _apply_filters_to_first_location_occurrence(
354
354
new_match_traversal = []
355
355
newly_filtered_locations = set ()
356
356
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
358
358
current_location = match_step .as_block .location
359
359
360
360
if current_location in newly_filtered_locations :
@@ -394,8 +394,8 @@ def _apply_filters_to_first_location_occurrence(
394
394
def collect_filters_to_first_location_occurrence (compound_match_query ):
395
395
"""Collect all filters for a particular location to the first instance of the location.
396
396
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 .
399
399
OrientDB does not resolve this behavior correctly. Therefore, for each MatchQuery,
400
400
we collect all the filters for each location in a list. For each location,
401
401
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):
566
566
The `visitor_fn` implements these behaviors (see `_update_context_field_expression`).
567
567
568
568
Args:
569
- match_traversals: list of match traversal enitities to be lowered
569
+ match_traversals: list of match traversal entities to be lowered
570
570
visitor_fn: visit_and_update function for lowering expressions in given match traversal
571
571
572
572
Returns:
@@ -592,7 +592,7 @@ def _lower_non_existent_context_field_filters(match_traversals, visitor_fn):
592
592
593
593
594
594
def lower_context_field_expressions (compound_match_query ):
595
- """Lower Expressons involving non-existent ContextFields."""
595
+ """Lower Expressions involving non-existent ContextFields."""
596
596
if len (compound_match_query .match_queries ) == 0 :
597
597
raise AssertionError (
598
598
"Received CompoundMatchQuery {} with no MatchQuery objects." .format (
@@ -601,7 +601,7 @@ def lower_context_field_expressions(compound_match_query):
601
601
)
602
602
elif len (compound_match_query .match_queries ) == 1 :
603
603
# 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).
605
605
return compound_match_query
606
606
else :
607
607
new_match_queries = []
0 commit comments