Browse Source

ref(lang): 🙊 (#32292)

Marcos Gaeta 3 years ago
parent
commit
71583b888a

+ 1 - 1
src/sentry/db/models/query.py

@@ -43,7 +43,7 @@ def update(self: Model, using: str | None = None, **kwargs: Any) -> int:
             "Somehow we have updated a negative number of rows. You seem to have a problem with your db backend."
         )
     else:
-        raise ValueError("Somehow we have updated multiple rows, and you are now royally fucked.")
+        raise ValueError("Somehow we have updated multiple rows. This is very, very bad.")
 
 
 update.alters_data = True  # type: ignore

+ 3 - 3
src/sentry/db/postgres/base.py

@@ -11,7 +11,7 @@ from .decorators import (
     auto_reconnect_connection,
     auto_reconnect_cursor,
     capture_transaction_exceptions,
-    less_shitty_error_messages,
+    more_better_error_messages,
 )
 from .operations import DatabaseOperations
 
@@ -80,7 +80,7 @@ class CursorWrapper:
 
     @capture_transaction_exceptions
     @auto_reconnect_cursor
-    @less_shitty_error_messages
+    @more_better_error_messages
     def execute(self, sql, params=None):
         if params is not None:
             return self.cursor.execute(sql, clean_bad_params(params))
@@ -88,7 +88,7 @@ class CursorWrapper:
 
     @capture_transaction_exceptions
     @auto_reconnect_cursor
-    @less_shitty_error_messages
+    @more_better_error_messages
     def executemany(self, sql, paramlist=()):
         return self.cursor.executemany(sql, paramlist)
 

+ 1 - 1
src/sentry/db/postgres/decorators.py

@@ -79,7 +79,7 @@ def capture_transaction_exceptions(func):
     return inner
 
 
-def less_shitty_error_messages(func):
+def more_better_error_messages(func):
     """
     Wraps functions where the first param is a SQL statement and enforces
     any exceptions thrown will also contain the statement in the message.

+ 1 - 1
src/sentry/integrations/jira/integration.py

@@ -669,7 +669,7 @@ class JiraIntegration(IntegrationInstallation, IssueSyncMixin):
         # Sort based on priority, then field name
         dynamic_fields.sort(key=lambda f: anti_gravity.get(f, (0, f)))
 
-        # build up some dynamic fields based on required shit.
+        # Build up some dynamic fields based on what is required.
         for field in dynamic_fields:
             if field in standard_fields or field in [x.strip() for x in ignored_fields]:
                 # don't overwrite the fixed fields for the form.

+ 1 - 2
src/sentry/receivers/core.py

@@ -92,8 +92,7 @@ def create_default_project(id, name, slug, verbosity=2, **kwargs):
             sender=create_default_project,
         )
 
-        # HACK: manually update the ID after insert due to Postgres
-        # sequence issues. Seriously, fuck everything about this.
+        # HACK: Manually update the ID after insert due to Postgres sequence issues.
         connection = connections[project._state.db]
         cursor = connection.cursor()
         cursor.execute(PROJECT_SEQUENCE_FIX)

+ 2 - 2
src/sentry/utils/pytest/selenium.py

@@ -445,8 +445,8 @@ def pytest_addoption(parser):
 
 
 def pytest_configure(config):
-    if hasattr(config, "slaveinput"):
-        return  # xdist slave
+    if hasattr(config, "workerinput"):
+        return  # xdist worker
 
     config.option.selenium_driver = (
         config.getoption("selenium_driver")

+ 1 - 2
src/sentry/web/frontend/twofactor.py

@@ -37,8 +37,7 @@ class TwoFactorAuthView(BaseView):
         return rv
 
     def fail_signin(self, request: Request, user, form):
-        # Ladies and gentlemen: the world's shittiest bruteforce
-        # prevention.
+        # Ladies and gentlemen: the world's second-worst bruteforce prevention.
         time.sleep(2.0)
         form.errors["__all__"] = [_("Invalid confirmation code. Try again.")]
 

+ 1 - 1
src/sentry_plugins/jira/plugin.py

@@ -206,7 +206,7 @@ class JiraPlugin(CorePluginMixin, IssuePlugin2):
 
         dynamic_fields = list(issue_type_meta.get("fields").keys())
         dynamic_fields.sort(key=lambda f: anti_gravity.get(f) or 0)
-        # build up some dynamic fields based on required shit.
+        # Build up some dynamic fields based on what is required.
         for field in dynamic_fields:
             if field in standard_fields or field in [x.strip() for x in ignored_fields]:
                 # don't overwrite the fixed fields for the form.

+ 4 - 4
static/app/locale.tsx

@@ -108,10 +108,10 @@ function formatForReact(formatString: string, args: FormatArg[]): React.ReactNod
     if (React.isValidElement(arg)) {
       nodes.push(React.cloneElement(arg, {key: idx}));
     } else {
-      // not a react element, fuck around with it so that sprintf.format
-      // can format it for us.  We make sure match[2] is null so that we
-      // do not go down the object path, and we set match[1] to the first
-      // index and then pass an array with two items in.
+      // Not a react element, massage it so that sprintf.format can format it
+      // for us.  We make sure match[2] is null so that we do not go down the
+      // object path, and we set match[1] to the first index and then pass an
+      // array with two items in.
       match[2] = null;
       match[1] = 1;
       nodes.push(<span key={idx++}>{sprintf.format([match], [null, arg])}</span>);

+ 3 - 3
tests/relay_integration/lang/java/test_plugin.py

@@ -102,7 +102,7 @@ class BasicResolvingIntegrationTest(RelayStoreHelper, TransactionTestCase):
                         },
                         "module": "org.a.b",
                         "type": "g$a",
-                        "value": "Shit broke yo",
+                        "value": "Oh no",
                     }
                 ]
             },
@@ -197,7 +197,7 @@ class BasicResolvingIntegrationTest(RelayStoreHelper, TransactionTestCase):
                         },
                         "module": "org.a.b",
                         "type": "g$a",
-                        "value": "Shit broke yo",
+                        "value": "Oh no",
                     }
                 ]
             },
@@ -295,7 +295,7 @@ class BasicResolvingIntegrationTest(RelayStoreHelper, TransactionTestCase):
                             ]
                         },
                         "type": "RuntimeException",
-                        "value": "Shit broke yo",
+                        "value": "Oh no",
                     }
                 ]
             },

Some files were not shown because too many files changed in this diff