Browse Source

Spelling visibility (#36055)

Josh Soref 2 years ago
parent
commit
8b13ba0e01

+ 1 - 1
src/sentry/search/events/builder.py

@@ -1170,7 +1170,7 @@ class QueryBuilder:
         return function in self.function_converter
 
     def parse_function(self, match: Match[str]) -> Tuple[str, Optional[str], List[str], str]:
-        """Given a FUNCTION_PATTERN match, seperate the function name, arguments
+        """Given a FUNCTION_PATTERN match, separate the function name, arguments
         and alias out
         """
         raw_function = match.group("function")

+ 2 - 2
src/sentry/search/events/datasets/discover.py

@@ -1391,8 +1391,8 @@ class DiscoverDatasetConfig(DatasetConfig):
         Parses a release stage search and returns a snuba condition to filter to the
         requested releases.
         """
-        # TODO: Filter by project here as well. It's done elsewhere, but could critcally limit versions
-        # for orgs with thousands of projects, each with their own releases (potentailly drowning out ones we care about)
+        # TODO: Filter by project here as well. It's done elsewhere, but could critically limit versions
+        # for orgs with thousands of projects, each with their own releases (potentially drowning out ones we care about)
 
         if "organization_id" not in self.builder.params:
             raise ValueError("organization_id is a required param")

+ 1 - 1
src/sentry/search/events/fields.py

@@ -373,7 +373,7 @@ FIELD_ALIASES = {
                 params.get("project_id"),
             ),
         ),
-        # the team key transaction field is intentially not added to the discover/fields list yet
+        # the team key transaction field is intentionally not added to the discover/fields list yet
         # because there needs to be some work on the front end to integrate this into discover
         PseudoField(
             TEAM_KEY_TRANSACTION_ALIAS,

+ 2 - 2
src/sentry/search/events/filter.py

@@ -325,8 +325,8 @@ def _release_stage_filter_converter(
     Parses a release stage search and returns a snuba condition to filter to the
     requested releases.
     """
-    # TODO: Filter by project here as well. It's done elsewhere, but could critcally limit versions
-    # for orgs with thousands of projects, each with their own releases (potentailly drowning out ones we care about)
+    # TODO: Filter by project here as well. It's done elsewhere, but could critically limit versions
+    # for orgs with thousands of projects, each with their own releases (potentially drowning out ones we care about)
 
     if not params or "organization_id" not in params:
         raise ValueError("organization_id is a required param")

+ 1 - 1
src/sentry/snuba/discover.py

@@ -928,7 +928,7 @@ def get_histogram_column(fields, key_column, histogram_params, array_column):
 def find_histogram_params(num_buckets, min_value, max_value, multiplier):
     """
     Compute the parameters to use for the histogram. Using the provided
-    arguments, ensure that the generated histogram encapsolates the desired range.
+    arguments, ensure that the generated histogram encapsulates the desired range.
 
     :param int num_buckets: The number of buckets the histogram should contain.
     :param float min_value: The minimum value allowed to be in the histogram inclusive.

+ 3 - 3
static/app/utils/discover/eventView.tsx

@@ -286,7 +286,7 @@ class EventView {
   interval: string | undefined;
   expired?: boolean;
   createdBy: User | undefined;
-  additionalConditions: MutableSearch; // This allows views to always add additional conditins to the query to get specific data. It should not show up in the UI unless explicitly called.
+  additionalConditions: MutableSearch; // This allows views to always add additional conditions to the query to get specific data. It should not show up in the UI unless explicitly called.
 
   constructor(props: {
     additionalConditions: MutableSearch;
@@ -548,9 +548,9 @@ class EventView {
 
       if (currentValue && otherValue) {
         const currentDateTime = moment.utc(currentValue);
-        const othereDateTime = moment.utc(otherValue);
+        const otherDateTime = moment.utc(otherValue);
 
-        if (!currentDateTime.isSame(othereDateTime)) {
+        if (!currentDateTime.isSame(otherDateTime)) {
           return false;
         }
       }

+ 1 - 1
tests/snuba/api/endpoints/test_group_details.py

@@ -166,7 +166,7 @@ class GroupDetailsTest(APITestCase, SnubaTestCase):
         )
         assert response.status_code == 200
         response = self.client.put(
-            url, {"assignedTo": "user@doesntexist.com", "status": "unresolved"}, format="json"
+            url, {"assignedTo": "user@doesnotexist.com", "status": "unresolved"}, format="json"
         )
         assert response.status_code == 400
         assert response.data == {

+ 1 - 1
tests/snuba/api/endpoints/test_organization_group_index.py

@@ -2227,7 +2227,7 @@ class GroupUpdateTest(APITestCase, SnubaTestCase):
         """
         Test that ensures that if we basically know the next release when clicking on Resolved
         In Next Release because that release exists, then we can short circuit setting
-        GroupResolution to type "inNextRelease", and then having `clear_exrired_resolutions` run
+        GroupResolution to type "inNextRelease", and then having `clear_expired_resolutions` run
         once a new release is created to convert GroupResolution to in_release and set Activity.
         Basically we treat "ResolvedInNextRelease" as "ResolvedInRelease" when there is a release
         that was created after the last release associated with the group being resolved

+ 4 - 4
tests/snuba/api/endpoints/test_organization_sessions.py

@@ -135,16 +135,16 @@ class OrganizationSessionsEndpointTest(APITestCase, SnubaTestCase):
         assert response.data == {"detail": "You do not have permission to perform this action."}
 
     def test_unknown_field(self):
-        response = self.do_request({"field": ["summ(sessin)"]})
+        response = self.do_request({"field": ["summ(session)"]})
 
         assert response.status_code == 400, response.content
-        assert response.data == {"detail": 'Invalid field: "summ(sessin)"'}
+        assert response.data == {"detail": 'Invalid field: "summ(session)"'}
 
     def test_unknown_groupby(self):
-        response = self.do_request({"field": ["sum(session)"], "groupBy": ["envriomnent"]})
+        response = self.do_request({"field": ["sum(session)"], "groupBy": ["environment_"]})
 
         assert response.status_code == 400, response.content
-        assert response.data == {"detail": 'Invalid groupBy: "envriomnent"'}
+        assert response.data == {"detail": 'Invalid groupBy: "environment_"'}
 
     def test_illegal_groupby(self):
         response = self.do_request({"field": ["sum(session)"], "groupBy": ["issue.id"]})

+ 2 - 2
tests/snuba/api/endpoints/test_organization_stats_v2.py

@@ -184,14 +184,14 @@ class OrganizationStatsTestV2(APITestCase, OutcomesSnubaTest):
         response = self.do_request(
             {
                 "field": ["sum(quantity)"],
-                "groupBy": ["cattygory"],
+                "groupBy": ["category_"],
                 "statsPeriod": "1d",
                 "interval": "1d",
             }
         )
 
         assert response.status_code == 400, response.content
-        assert result_sorted(response.data) == {"detail": 'Invalid groupBy: "cattygory"'}
+        assert result_sorted(response.data) == {"detail": 'Invalid groupBy: "category_"'}
 
     def test_resolution_invalid(self):
         self.login_as(user=self.user)