Repository Analysis

polarsource/polar

Polar — A billing platform for the intelligence era

11.0 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of polarsource/polar, a Python project with 10,055 GitHub stars. SynthScan v2.0 examined 718,444 lines of code across 3723 source files, recording 6706 pattern matches distributed across 22 syntactic categories. The overall adjusted score of 11.0 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

11.0
Adjusted Score
11.0
Raw Score
100%
Time Factor
2026-07-14
Last Push
10.1K
Stars
Python
Language
718.4K
Lines of Code
3.7K
Files
6.7K
Pattern Hits
2026-07-14
Scan Date
0.05
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 1HIGH 172MEDIUM 440LOW 6093

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 6706 distinct pattern matches across 22 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers4449 hits · 4018 pts
SeverityFileLineSnippetContext
LOWclients/packages/ui/src/components/ui/chart.tsx325function getPayloadConfigFromPayload(CODE
LOWclients/apps/app/auth/refresher.ts66function oauthTokenEndpointErrorCode(error: unknown): string | undefined {CODE
LOWclients/apps/app/auth/refresher.ts78function shouldClearSessionAfterTokenRefreshFailure(error: unknown): boolean {CODE
LOWclients/apps/app/providers/NotificationsProvider.tsx24async function registerForPushNotificationsAsync() {CODE
LOWclients/apps/app/providers/OrganizationProvider.tsx31export function PolarOrganizationProvider({ children }: PropsWithChildren) {CODE
LOW…/[organization]/portal/CustomerPortalLayoutWrapper.tsx18export function CustomerPortalLayoutWrapper({CODE
LOWclients/apps/web/src/utils/order.ts40export function isOrderInDunningLifecycle(CODE
LOWclients/apps/web/src/utils/i18n/index.ts8export function parseAcceptLanguageHeader(CODE
LOWclients/apps/web/src/utils/i18n/index.ts39function getLocaleFromAcceptLanguageHeader(CODE
LOWclients/apps/web/src/utils/i18n/index.ts45function getPrimaryLanguageForLocale(locale: string): string {CODE
LOWclients/apps/web/src/utils/i18n/index.ts49export function findMatchingLocaleInAcceptLanguageHeader(CODE
LOW…/components/Metrics/CancellationsDistributionChart.tsx30export default function CancellationsDistributionChart({CODE
LOW…b/src/components/Metrics/CancellationsStackedChart.tsx57export default function CancellationsStackedChart({CODE
LOW…nents/Metrics/dashboards/DashboardDetailClientPage.tsx32export default function DashboardDetailClientPage({CODE
LOW…src/components/Settings/OrganizationDeleteSettings.tsx19export default function OrganizationDeleteSettings({CODE
LOW…src/components/Settings/BackupCodesRegenerateModal.tsx11export default function BackupCodesRegenerateModal({CODE
LOWclients/apps/web/src/components/Benefit/utils.tsx99export function isBenefitVisibilityConfigurable(CODE
LOWclients/apps/web/src/hooks/queries/customerPortal.ts8export function useCustomerPortalCustomer(options?: {CODE
LOWserver/polar/config.py30def _validate_email_renderer_binary_path(value: Path) -> Path:CODE
LOWserver/polar/config.py634 def is_read_replica_configured(self) -> bool:STRING
LOWserver/polar/config.py696 def stripe_descriptor_suffix_max_length(self) -> int:STRING
LOWserver/polar/config.py708 def get_pydantic_gateway_model(STRING
LOWserver/polar/exception_handlers.py26async def request_validation_exception_handler(CODE
LOWserver/polar/exception_handlers.py36async def polar_redirection_exception_handler(CODE
LOWserver/polar/exception_handlers.py50async def polar_not_modified_handler(request: Request, exc: Exception) -> Response:CODE
LOWserver/polar/operational_errors.py21def _sql_timeout_error_matcher(exc: BaseException) -> bool:CODE
LOWserver/polar/operational_errors.py37def _sql_lock_not_available_error_matcher(exc: BaseException) -> bool:CODE
LOWserver/polar/operational_errors.py51def _sql_deadlock_error_matcher(exc: BaseException) -> bool:CODE
LOWserver/polar/operational_errors.py62def _timeout_lock_error_matcher(exc: BaseException) -> bool:CODE
LOWserver/polar/operational_errors.py66def _external_event_already_handled_error_matcher(exc: BaseException) -> bool:CODE
LOWserver/polar/operational_errors.py73def _tinybird_operational_error_matcher(exc: BaseException) -> bool:CODE
LOWserver/polar/operational_errors.py80def _polar_self_client_operational_error_matcher(exc: BaseException) -> bool:CODE
LOWserver/polar/operational_errors.py87def _email_sender_operational_error_matcher(exc: BaseException) -> bool:CODE
LOWserver/polar/app.py110def generate_unique_openapi_id(route: APIRoute) -> str:CODE
LOWserver/polar/organization/service.py155def _is_hosted_website_domain(website_domain: str) -> bool:CODE
LOWserver/polar/organization/service.py162def _email_domain_matches_website(email_domain: str, website_domain: str) -> bool:CODE
LOWserver/polar/organization/service.py423 async def _validate_currency_change(CODE
LOWserver/polar/organization/service.py916 async def _sync_polar_self_customer_owner(CODE
LOWserver/polar/organization/service.py1032 def _enqueue_cancel_pending_payouts(self, organization: Organization) -> None:CODE
LOWserver/polar/organization/service.py1052 async def confirm_organization_reviewed(CODE
LOWserver/polar/organization/service.py1306 async def handle_ongoing_review_verdict(CODE
LOWserver/polar/organization/service.py1410 async def unsnooze_expired_organizations(CODE
LOWserver/polar/organization/service.py1430 async def offboard_expired_organizations(CODE
LOWserver/polar/organization/service.py1456 async def cancel_expired_organizations_subscriptions(CODE
LOWserver/polar/organization/service.py1475 async def set_organization_offboarded(CODE
LOWserver/polar/organization/service.py1494 def _transition_to_offboarded(CODE
LOWserver/polar/organization/service.py1511 async def set_organization_under_review(CODE
LOWserver/polar/organization/service.py1535 async def set_organization_offboarding(CODE
LOWserver/polar/organization/service.py1751 def _build_identity_verification_check(CODE
LOWserver/polar/organization/service.py1791 def _build_product_description_check(CODE
LOWserver/polar/organization/service.py1809 def _build_payout_account_check(CODE
LOWserver/polar/organization/service.py1837 async def _build_product_configuration_check(CODE
LOWserver/polar/organization/service.py1849 async def _build_setup_readiness_check(CODE
LOWserver/polar/organization/service.py2118 async def mark_ai_onboarding_complete(CODE
LOWserver/polar/organization/tasks.py82async def organization_unsnooze_expired() -> None:CODE
LOWserver/polar/organization/tasks.py94async def organization_offboard_expired() -> None:CODE
LOWserver/polar/organization/tasks.py106async def organization_cancel_expired_subscriptions() -> None:CODE
LOWserver/polar/organization/tasks.py142def _check_threshold_debounce_key(account_id: uuid.UUID) -> str:CODE
LOWserver/polar/organization/tasks.py151async def organization_check_threshold(account_id: uuid.UUID) -> None:CODE
LOWserver/polar/organization/tasks.py176async def organization_under_review(organization_id: uuid.UUID) -> None:CODE
4389 more matches not shown…
Decorative Section Separators259 hits · 846 pts
SeverityFileLineSnippetContext
MEDIUMterraform/test/network.tf1# =============================================================================COMMENT
MEDIUMterraform/test/network.tf3# =============================================================================COMMENT
MEDIUMterraform/test/aws.tf103# =============================================================================COMMENT
MEDIUMterraform/test/aws.tf105# =============================================================================COMMENT
MEDIUMterraform/test/aws.tf127# =============================================================================COMMENT
MEDIUMterraform/test/aws.tf129# =============================================================================COMMENT
MEDIUMterraform/test/aws.tf183# =============================================================================COMMENT
MEDIUMterraform/test/aws.tf185# =============================================================================COMMENT
MEDIUMterraform/test/render.tf2# =============================================================================COMMENT
MEDIUMterraform/test/render.tf4# =============================================================================COMMENT
MEDIUMterraform/test/render.tf18# =============================================================================COMMENT
MEDIUMterraform/test/render.tf20# =============================================================================COMMENT
MEDIUMterraform/test/render.tf32# =============================================================================COMMENT
MEDIUMterraform/test/render.tf34# =============================================================================COMMENT
MEDIUMterraform/test/render.tf76# =============================================================================COMMENT
MEDIUMterraform/test/render.tf78# =============================================================================COMMENT
MEDIUMterraform/test/render.tf84# =============================================================================COMMENT
MEDIUMterraform/test/render.tf86# =============================================================================COMMENT
MEDIUMterraform/test/render.tf303# =============================================================================COMMENT
MEDIUMterraform/test/render.tf305# =============================================================================COMMENT
MEDIUMterraform/test/render.tf354# =============================================================================COMMENT
MEDIUMterraform/test/render.tf356# =============================================================================COMMENT
MEDIUMterraform/test/vercel.tf1# =============================================================================COMMENT
MEDIUMterraform/test/vercel.tf3# =============================================================================COMMENT
MEDIUMterraform/sandbox/network.tf1# =============================================================================COMMENT
MEDIUMterraform/sandbox/network.tf3# =============================================================================COMMENT
MEDIUMterraform/sandbox/aws.tf108# =============================================================================COMMENT
MEDIUMterraform/sandbox/aws.tf110# =============================================================================COMMENT
MEDIUMterraform/sandbox/aws.tf129# =============================================================================COMMENT
MEDIUMterraform/sandbox/aws.tf131# =============================================================================COMMENT
MEDIUMterraform/sandbox/aws.tf181# =============================================================================COMMENT
MEDIUMterraform/sandbox/aws.tf183# =============================================================================COMMENT
MEDIUMterraform/sandbox/variables.tf1# =============================================================================COMMENT
MEDIUMterraform/sandbox/variables.tf3# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf2# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf4# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf13# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf15# ============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf30# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf32# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf47# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf49# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf77# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf79# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf85# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf87# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf322# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf324# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf371# =============================================================================COMMENT
MEDIUMterraform/sandbox/render.tf373# =============================================================================COMMENT
MEDIUMterraform/sandbox/vercel.tf1# =============================================================================COMMENT
MEDIUMterraform/sandbox/vercel.tf3# =============================================================================COMMENT
MEDIUMterraform/production/network.tf1# =============================================================================COMMENT
MEDIUMterraform/production/network.tf3# =============================================================================COMMENT
MEDIUMterraform/production/aws.tf98# =============================================================================COMMENT
MEDIUMterraform/production/aws.tf100# =============================================================================COMMENT
MEDIUMterraform/production/aws.tf119# =============================================================================COMMENT
MEDIUMterraform/production/aws.tf121# =============================================================================COMMENT
MEDIUMterraform/production/aws.tf171# =============================================================================COMMENT
MEDIUMterraform/production/aws.tf173# =============================================================================COMMENT
199 more matches not shown…
Unused Imports675 hits · 614 pts
SeverityFileLineSnippetContext
LOWserver/polar/tasks.py1CODE
LOWserver/polar/tasks.py2CODE
LOWserver/polar/tasks.py3CODE
LOWserver/polar/tasks.py4CODE
LOWserver/polar/tasks.py5CODE
LOWserver/polar/tasks.py6CODE
LOWserver/polar/tasks.py7CODE
LOWserver/polar/tasks.py8CODE
LOWserver/polar/tasks.py9CODE
LOWserver/polar/tasks.py10CODE
LOWserver/polar/tasks.py11CODE
LOWserver/polar/tasks.py12CODE
LOWserver/polar/tasks.py13CODE
LOWserver/polar/tasks.py14CODE
LOWserver/polar/tasks.py15CODE
LOWserver/polar/tasks.py16CODE
LOWserver/polar/tasks.py17CODE
LOWserver/polar/tasks.py18CODE
LOWserver/polar/tasks.py19CODE
LOWserver/polar/tasks.py20CODE
LOWserver/polar/tasks.py21CODE
LOWserver/polar/tasks.py22CODE
LOWserver/polar/tasks.py23CODE
LOWserver/polar/tasks.py24CODE
LOWserver/polar/tasks.py25CODE
LOWserver/polar/tasks.py26CODE
LOWserver/polar/tasks.py27CODE
LOWserver/polar/tasks.py28CODE
LOWserver/polar/tasks.py29CODE
LOWserver/polar/tasks.py30CODE
LOWserver/polar/tasks.py31CODE
LOWserver/polar/tasks.py32CODE
LOWserver/polar/tasks.py33CODE
LOWserver/polar/tasks.py34CODE
LOWserver/polar/tasks.py35CODE
LOWserver/polar/tasks.py36CODE
LOWserver/polar/tasks.py37CODE
LOWserver/polar/tasks.py38CODE
LOWserver/polar/tasks.py39CODE
LOWserver/polar/tasks.py40CODE
LOWserver/polar/tasks.py41CODE
LOWserver/polar/logfire.py23CODE
LOWserver/polar/logfire.py24CODE
LOWserver/polar/logfire.py24CODE
LOWserver/polar/logfire.py25CODE
LOWserver/polar/logfire.py26CODE
LOWserver/polar/posthog.py1CODE
LOWserver/polar/postgres.py8CODE
LOWserver/polar/app.py9CODE
LOWserver/polar/organization/service.py37CODE
LOWserver/polar/event_type/__init__.py1CODE
LOWserver/polar/order/repository.py46CODE
LOWserver/polar/metrics/metrics.py8CODE
LOWserver/polar/metrics/queries.py46CODE
LOWserver/polar/custom_field/attachment.py14CODE
LOWserver/polar/custom_field/data.py14CODE
LOWserver/polar/custom_field/data.py14CODE
LOWserver/polar/custom_field/data.py16CODE
LOWserver/polar/account_credit/__init__.py1CODE
LOWserver/polar/checkout_link/repository.py26CODE
615 more matches not shown…
Self-Referential Comments157 hits · 514 pts
SeverityFileLineSnippetContext
MEDIUMterraform/.terraform.lock.hcl1# This file is maintained automatically by "terraform init".COMMENT
MEDIUMserver/polar/transaction/service/dispute.py107 # Create the dispute, i.e. the transaction withdrawing the amountCOMMENT
MEDIUM…rver/polar/customer_portal/endpoints/oauth_accounts.py216 # Create a session only after the OAuth provider has confirmed the code.COMMENT
MEDIUM…ver/polar/backoffice/organizations_v2/orders_import.py341 # Create a grant manually to force propertiesCOMMENT
MEDIUMserver/polar/backoffice/organizations_v2/analytics.py183 # Create a copy to avoid mutating the original listCOMMENT
MEDIUMserver/polar/backoffice/organizations_v2/endpoints.py4228 # Create the creditCOMMENT
MEDIUMserver/polar/payout/service.py700 # Create a new payout attemptCOMMENT
MEDIUMserver/tests/organization/test_service.py1626 # Create a review recordCOMMENT
MEDIUMserver/tests/organization/test_endpoints.py1047 # Create a customer and order for this organizationCOMMENT
MEDIUMserver/tests/organization/test_endpoints.py1080 # Create a customer and active subscription for this organizationCOMMENT
MEDIUMserver/tests/organization/test_backfill_members.py508 # Create a benefit grant without member_id (legacy)COMMENT
MEDIUMserver/tests/organization/test_backfill_members.py631 # Create a grant that already has member_id setCOMMENT
MEDIUMserver/tests/organization/test_backfill_members.py771 # Create a grant under the old seat-holder customerCOMMENT
MEDIUMserver/tests/organization/test_backfill_members.py851 # Create a grant and license key under the old seat-holder customerCOMMENT
MEDIUM…er/tests/organization/test_backfill_benefit_records.py648 # Create a second customer+member for a different grantCOMMENT
MEDIUMserver/tests/order/test_service.py2857 # Create a pending order with tax calculation processor IDCOMMENT
MEDIUMserver/tests/order/test_service.py2872 # Create a paymentCOMMENT
MEDIUMserver/tests/order/test_service.py2904 # Create a customer with a billing address so that _calculate_taxCOMMENT
MEDIUMserver/tests/order/test_service.py3572 # Create a failed payment with a non-recoverable decline reasonCOMMENT
MEDIUMserver/tests/order/test_service.py5369 # Create a subscriptionCOMMENT
MEDIUMserver/tests/transaction/service/test_transaction.py204 # Create an old balance transaction (8 days ago - should be available)COMMENT
MEDIUMserver/tests/transaction/service/test_transaction.py216 # Create a recent balance transaction (2 days ago - should NOT be available)COMMENT
MEDIUMserver/tests/transaction/service/test_transaction.py227 # Create a payout transaction (2 days ago - should ALWAYS be available)COMMENT
MEDIUMserver/tests/transaction/service/test_transaction.py238 # Create a payout fee (2 days ago - should ALWAYS be available)COMMENT
MEDIUMserver/tests/transaction/service/test_refund.py479 # Create a charge and orderCOMMENT
MEDIUMserver/tests/transaction/service/test_refund.py490 # Create the payment transactionCOMMENT
MEDIUMserver/tests/transaction/service/test_refund.py639 # Create a charge and orderCOMMENT
MEDIUMserver/tests/transaction/service/test_refund.py650 # Create the payment transactionCOMMENT
MEDIUMserver/tests/customer_email_update/test_service.py99 # Create an existing pending verificationCOMMENT
MEDIUMserver/tests/payment/test_service.py24 # Create a checkoutCOMMENT
MEDIUMserver/tests/payment/test_service.py27 # Create a charge with checkout_id in metadataCOMMENT
MEDIUMserver/tests/payment/test_service.py67 # Create an orderCOMMENT
MEDIUMserver/tests/payment/test_service.py74 # Create a charge with invoiceCOMMENT
MEDIUMserver/tests/payment/test_service.py108 # Create a checkoutCOMMENT
MEDIUMserver/tests/payment/test_service.py114 # Create an order from the checkoutCOMMENT
MEDIUMserver/tests/payment/test_service.py122 # Create a charge with checkout_id in metadataCOMMENT
MEDIUMserver/tests/payment/test_service.py310 # Create a checkoutCOMMENT
MEDIUMserver/tests/payment/test_service.py313 # Create a payment intent with last_payment_errorCOMMENT
MEDIUMserver/tests/payment/test_service.py359 # Create an orderCOMMENT
MEDIUMserver/tests/payment/test_service.py366 # Create a payment intent with last_payment_errorCOMMENT
MEDIUMserver/tests/payment/test_service.py161 # Create a charge with wallet_id in metadataCOMMENT
MEDIUMserver/tests/payment/test_service.py200 # Create a checkoutCOMMENT
MEDIUMserver/tests/payment/test_service.py206 # Create a charge with checkout_id in metadataCOMMENT
MEDIUMserver/tests/payment/test_service.py412 # Create an orderCOMMENT
MEDIUMserver/tests/payment/test_service.py491 # Create an orderCOMMENT
MEDIUMserver/tests/payment/test_service.py498 # Create a payment intent with last_payment_errorCOMMENT
MEDIUMserver/tests/member/test_service.py142 # Create a memberCOMMENT
MEDIUMserver/tests/member/test_service.py464 # Create the first member (owner)COMMENT
MEDIUMserver/tests/member/test_service.py511 # Create the first member (owner)COMMENT
MEDIUMserver/tests/member/test_endpoints.py200 # Create a customer for a different organization that the user doesn't have access toCOMMENT
MEDIUMserver/tests/member/test_endpoints.py209 # Create a memberCOMMENT
MEDIUMserver/tests/member/test_endpoints.py156 # Create a customerCOMMENT
MEDIUMserver/tests/member/test_endpoints.py1319 # Create a customer and memberCOMMENT
MEDIUMserver/tests/member/test_endpoints.py1368 # Create a member for a different organizationCOMMENT
MEDIUMserver/tests/customer_portal/endpoints/test_customer.py87 # Create a payment method with no subscriptionsCOMMENT
MEDIUMserver/tests/customer_portal/endpoints/test_customer.py113 # Create an active subscription using the first payment methodCOMMENT
MEDIUMserver/tests/customer_portal/endpoints/test_customer.py145 # Create a payment methodCOMMENT
MEDIUMserver/tests/customer_portal/endpoints/test_customer.py148 # Create an active subscription using this payment methodCOMMENT
MEDIUMserver/tests/customer_portal/endpoints/test_customer.py181 # Create a payment methodCOMMENT
MEDIUMserver/tests/customer_portal/endpoints/test_customer.py184 # Create a canceled subscription using this payment methodCOMMENT
97 more matches not shown…
Docstring Block Structure93 hits · 465 pts
SeverityFileLineSnippetContext
HIGHserver/polar/member/service.py155 Soft delete a member. Any active seats assigned to this member will be automatically revoked bSTRING
HIGHserver/polar/member/service.py577 Create a new member for a customer. The customer is resolved by either its internal ID (`customer_id`)STRING
HIGHserver/polar/kit/http.py72 Validate that the URL is crawlable (not private/reserved). Args: url: The URL to validate. ReturnSTRING
HIGHserver/polar/tax/tax_id.py457 Validate a tax ID for a given country. Args: number: The tax ID to validate. country: The counSTRING
HIGHserver/polar/tax/tax_id.py485 Convert a tax ID to the format expected by Stripe. Args: value: A tuple containing the tax ID and the STRING
HIGHserver/polar/tax/calculation/__init__.py79Calculate tax for the given parameters. Tries to calculate tax using the configured tax processors in order. IfSTRING
HIGHserver/polar/backoffice/forms.py63Render the form field as HTML. Args: id: The HTML id and name attribute for the field. STRING
HIGHserver/polar/backoffice/components/_description_list.py98Extract the raw attribute value from the data object. Args: item: The data object to extract from. STRING
HIGHserver/polar/backoffice/components/_description_list.py112Get the formatted string value for display. This method can be overridden in subclasses to provide custom formaSTRING
HIGHserver/polar/backoffice/components/_description_list.py146Get the formatted datetime string for display. Args: item: The data object to extract the datetime STRING
HIGHserver/polar/backoffice/components/_datatable.py213Extract the raw attribute value from the model item. Args: item: The model item to extract from. STRING
HIGHserver/polar/backoffice/components/_datatable.py227Get the formatted string value for display. This method can be overridden in subclasses to provide custom formaSTRING
HIGHserver/polar/backoffice/components/_datatable.py262Get the formatted datetime string for display. Args: item: The model item to extract the datetime fSTRING
HIGHserver/polar/product/price_set.py46Create a PriceSet from a product's prices filtered by currency. Args: product: The product containiSTRING
HIGHserver/polar/product/price_set.py63Create a PriceSet from a sequence of prices filtered by currency. Iterates through the provided currencies in oSTRING
HIGHserver/polar/benefit/strategies/base/service.py103 Executes the logic to grant a benefit to a customer. Args: benefit: The Benefit to grant. STRING
HIGHserver/polar/benefit/strategies/base/service.py141 Executes the logic when a subscription is renewed for a new cycle for a granted benefit. Args: STRING
HIGHserver/polar/benefit/strategies/base/service.py173 Executes the logic to revoke a benefit from a customer. Args: benefit: The Benefit to revoSTRING
HIGHserver/polar/benefit/strategies/base/service.py217 Validates the benefit properties before creation. Useful if we need to call external logic to make surSTRING
HIGHsdk/python/polar/v2026_04/files.py83 List files. **Scopes**: `files:read` `files:write` Args: organization_id: Filter STRING
HIGHsdk/python/polar/v2026_04/files.py336 List files. **Scopes**: `files:read` `files:write` Args: organization_id: Filter STRING
HIGHsdk/python/polar/v2026_04/payments.py96 List payments. **Scopes**: `payments:read` Args: organization_id: Filter by organSTRING
HIGHsdk/python/polar/v2026_04/payments.py250 List payments. **Scopes**: `payments:read` Args: organization_id: Filter by organSTRING
HIGHsdk/python/polar/v2026_04/checkouts.py105 List checkout sessions. **Scopes**: `checkouts:read` `checkouts:write` Args: orgaSTRING
HIGHsdk/python/polar/v2026_04/checkouts.py439 List checkout sessions. **Scopes**: `checkouts:read` `checkouts:write` Args: orgaSTRING
HIGHsdk/python/polar/v2026_04/meters.py92 List meters. **Scopes**: `meters:read` `meters:write` Args: organization_id: FiltSTRING
HIGHsdk/python/polar/v2026_04/meters.py356 List meters. **Scopes**: `meters:read` `meters:write` Args: organization_id: FiltSTRING
HIGHsdk/python/polar/v2026_04/disputes.py81 List disputes. **Scopes**: `disputes:read` `disputes:write` Args: organization_idSTRING
HIGHsdk/python/polar/v2026_04/disputes.py250 List disputes. **Scopes**: `disputes:read` `disputes:write` Args: organization_idSTRING
HIGHsdk/python/polar/v2026_04/members.py78 List members with optional customer ID filter. **Scopes**: `members:read` `members:write` ArgSTRING
HIGHsdk/python/polar/v2026_04/members.py174 List members with optional customer ID filter. **Scopes**: `members:read` `members:write` ArgSTRING
HIGHsdk/python/polar/v2026_04/license_keys.py95 Get license keys connected to the given organization & filters. **Scopes**: `license_keys:read` `licenSTRING
HIGHsdk/python/polar/v2026_04/license_keys.py406 Get license keys connected to the given organization & filters. **Scopes**: `license_keys:read` `licenSTRING
HIGHsdk/python/polar/v2026_04/customer_meters.py83 List customer meters. **Scopes**: `customer_meters:read` Args: organization_id: FSTRING
HIGHsdk/python/polar/v2026_04/customer_meters.py219 List customer meters. **Scopes**: `customer_meters:read` Args: organization_id: FSTRING
HIGHsdk/python/polar/v2026_04/checkout_links.py86 List checkout links. **Scopes**: `checkout_links:read` `checkout_links:write` Args: STRING
HIGHsdk/python/polar/v2026_04/checkout_links.py330 List checkout links. **Scopes**: `checkout_links:read` `checkout_links:write` Args: STRING
HIGHsdk/python/polar/v2026_04/events.py179 List event names. **Scopes**: `events:read` `events:write` Args: organization_id:STRING
HIGHsdk/python/polar/v2026_04/events.py434 List event names. **Scopes**: `events:read` `events:write` Args: organization_id:STRING
HIGHsdk/python/polar/v2026_04/refunds.py98 List refunds. **Scopes**: `refunds:read` `refunds:write` Args: id: Filter by refuSTRING
HIGHsdk/python/polar/v2026_04/refunds.py251 List refunds. **Scopes**: `refunds:read` `refunds:write` Args: id: Filter by refuSTRING
HIGHsdk/python/polar/v2026_04/subscriptions.py142 List subscriptions. **Scopes**: `subscriptions:read` `subscriptions:write` Args: STRING
HIGHsdk/python/polar/v2026_04/subscriptions.py548 List subscriptions. **Scopes**: `subscriptions:read` `subscriptions:write` Args: STRING
HIGHsdk/python/polar/v2026_04/discounts.py85 List discounts. **Scopes**: `discounts:read` `discounts:write` Args: organizationSTRING
HIGHsdk/python/polar/v2026_04/discounts.py323 List discounts. **Scopes**: `discounts:read` `discounts:write` Args: organizationSTRING
HIGHsdk/python/polar/v2026_04/products.py108 List products. **Scopes**: `products:read` `products:write` Args: id: Filter by pSTRING
HIGHsdk/python/polar/v2026_04/products.py389 List products. **Scopes**: `products:read` `products:write` Args: id: Filter by pSTRING
HIGHsdk/python/polar/v2026_04/orders.py126 List orders. **Scopes**: `orders:read` Args: organization_id: Filter by organizatSTRING
HIGHsdk/python/polar/v2026_04/orders.py557 List orders. **Scopes**: `orders:read` Args: organization_id: Filter by organizatSTRING
HIGHsdk/python/polar/v2026_04/organizations.py78 List organizations. **Scopes**: `organizations:read` `organizations:write` Args: STRING
HIGHsdk/python/polar/v2026_04/organizations.py270 List organizations. **Scopes**: `organizations:read` `organizations:write` Args: STRING
HIGHsdk/python/polar/v2026_04/benefits.py119 List benefits. **Scopes**: `benefits:read` `benefits:write` Args: organization_idSTRING
HIGHsdk/python/polar/v2026_04/benefits.py470 List the individual grants for a benefit. It's especially useful to check if a user has been granted aSTRING
HIGHsdk/python/polar/v2026_04/benefits.py581 List benefits. **Scopes**: `benefits:read` `benefits:write` Args: organization_idSTRING
HIGHsdk/python/polar/v2026_04/benefits.py933 List the individual grants for a benefit. It's especially useful to check if a user has been granted aSTRING
HIGHsdk/python/polar/v2026_04/custom_fields.py97 List custom fields. **Scopes**: `custom_fields:read` `custom_fields:write` Args: STRING
HIGHsdk/python/polar/v2026_04/custom_fields.py394 List custom fields. **Scopes**: `custom_fields:read` `custom_fields:write` Args: STRING
HIGHsdk/python/polar/v2026_04/webhooks.py77 List webhook endpoints. **Scopes**: `webhooks:read` `webhooks:write` Args: organiSTRING
HIGHsdk/python/polar/v2026_04/webhooks.py357 List webhook deliveries. Deliveries are all the attempts to deliver a webhook event to an endpoint. STRING
HIGHsdk/python/polar/v2026_04/webhooks.py483 List webhook endpoints. **Scopes**: `webhooks:read` `webhooks:write` Args: organiSTRING
33 more matches not shown…
Cross-File Repetition61 hits · 305 pts
SeverityFileLineSnippetContext
HIGHserver/polar/customer_portal/schemas/subscription.py0cancel an active subscription once the current period ends. or uncancel a subscription currently set to be revoked at peSTRING
HIGHserver/polar/subscription/schemas.py0cancel an active subscription once the current period ends. or uncancel a subscription currently set to be revoked at peSTRING
HIGHsdk/python/polar/v2026_04/inputs.py0cancel an active subscription once the current period ends. or uncancel a subscription currently set to be revoked at peSTRING
HIGHserver/polar/customer_portal/schemas/subscription.py0pause an active subscription at the end of the current period. or cancel a scheduled pause on a subscription set to be pSTRING
HIGHserver/polar/subscription/schemas.py0pause an active subscription at the end of the current period. or cancel a scheduled pause on a subscription set to be pSTRING
HIGHsdk/python/polar/v2026_04/inputs.py0pause an active subscription at the end of the current period. or cancel a scheduled pause on a subscription set to be pSTRING
HIGHserver/polar/product/schemas.py0list of pricing tiers for seat-based pricing. the minimum and maximum seat limits are derived from the tiers: - minimum_STRING
HIGHsdk/python/polar/v2026_04/inputs.py0list of pricing tiers for seat-based pricing. the minimum and maximum seat limits are derived from the tiers: - minimum_STRING
HIGHsdk/python/polar/v2026_04/outputs.py0list of pricing tiers for seat-based pricing. the minimum and maximum seat limits are derived from the tiers: - minimum_STRING
HIGHserver/polar/checkout/schemas.py0schema for a fixed amount discount that is applied once or forever.STRING
HIGHserver/polar/discount/schemas.py0schema for a fixed amount discount that is applied once or forever.STRING
HIGHsdk/python/polar/v2026_04/outputs.py0schema for a fixed amount discount that is applied once or forever.STRING
HIGHserver/polar/checkout/schemas.py0schema for a fixed amount discount that is applied on every invoice for a certain number of months.STRING
HIGHserver/polar/discount/schemas.py0schema for a fixed amount discount that is applied on every invoice for a certain number of months.STRING
HIGHsdk/python/polar/v2026_04/outputs.py0schema for a fixed amount discount that is applied on every invoice for a certain number of months.STRING
HIGHserver/polar/checkout/schemas.py0schema for a percentage discount that is applied once or forever.STRING
HIGHserver/polar/discount/schemas.py0schema for a percentage discount that is applied once or forever.STRING
HIGHsdk/python/polar/v2026_04/outputs.py0schema for a percentage discount that is applied once or forever.STRING
HIGHserver/polar/checkout/schemas.py0schema for a percentage discount that is applied on every invoice for a certain number of months.STRING
HIGHserver/polar/discount/schemas.py0schema for a percentage discount that is applied on every invoice for a certain number of months.STRING
HIGHsdk/python/polar/v2026_04/outputs.py0schema for a percentage discount that is applied on every invoice for a certain number of months.STRING
HIGHserver/polar/subscription/schemas.py0current consumption and spending for a subscription meter.STRING
HIGHserver/polar/customer/schemas/state.py0current consumption and spending for a subscription meter.STRING
HIGHsdk/python/polar/v2026_04/outputs.py0current consumption and spending for a subscription meter.STRING
HIGHserver/tests/customer_portal/service/test_order.py0test that % in query is treated as literal, not wildcard.STRING
HIGH…r/tests/customer_portal/service/test_customer_meter.py0test that % in query is treated as literal, not wildcard.STRING
HIGH…ver/tests/customer_portal/service/test_subscription.py0test that % in query is treated as literal, not wildcard.STRING
HIGHserver/tests/customer_portal/service/test_order.py0test that _ in query is treated as literal, not single-char wildcard.STRING
HIGH…r/tests/customer_portal/service/test_customer_meter.py0test that _ in query is treated as literal, not single-char wildcard.STRING
HIGH…ver/tests/customer_portal/service/test_subscription.py0test that _ in query is treated as literal, not single-char wildcard.STRING
HIGHsdk/python/polar/v2026_04/files.py0request an email change for the authenticated customer. args: **kwargs: request body parameters raises: httpvalidationerSTRING
HIGHsdk/python/polar/v2026_04/checkouts.py0request an email change for the authenticated customer. args: **kwargs: request body parameters raises: httpvalidationerSTRING
HIGHsdk/python/polar/v2026_04/meters.py0request an email change for the authenticated customer. args: **kwargs: request body parameters raises: httpvalidationerSTRING
HIGHsdk/python/polar/v2026_04/checkout_links.py0request an email change for the authenticated customer. args: **kwargs: request body parameters raises: httpvalidationerSTRING
HIGHsdk/python/polar/v2026_04/discounts.py0request an email change for the authenticated customer. args: **kwargs: request body parameters raises: httpvalidationerSTRING
HIGHsdk/python/polar/v2026_04/products.py0request an email change for the authenticated customer. args: **kwargs: request body parameters raises: httpvalidationerSTRING
HIGHsdk/python/polar/v2026_04/benefits.py0request an email change for the authenticated customer. args: **kwargs: request body parameters raises: httpvalidationerSTRING
HIGHsdk/python/polar/v2026_04/custom_fields.py0request an email change for the authenticated customer. args: **kwargs: request body parameters raises: httpvalidationerSTRING
HIGHsdk/python/polar/v2026_04/webhooks.py0request an email change for the authenticated customer. args: **kwargs: request body parameters raises: httpvalidationerSTRING
HIGHsdk/python/polar/v2026_04/customers/__init__.py0request an email change for the authenticated customer. args: **kwargs: request body parameters raises: httpvalidationerSTRING
HIGHsdk/python/polar/v2026_04/customer_portal/customers.py0request an email change for the authenticated customer. args: **kwargs: request body parameters raises: httpvalidationerSTRING
HIGHsdk/python/polar/v2026_04/payments.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/meters.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/disputes.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/customer_meters.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/events.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/subscriptions.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/discounts.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/products.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/orders.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/organizations.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/benefits.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/customers/__init__.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/customer_portal/wallets.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGH…thon/polar/v2026_04/customer_portal/customer_meters.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGH…python/polar/v2026_04/customer_portal/subscriptions.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/customer_portal/orders.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGH…ython/polar/v2026_04/customer_portal/benefit_grants.py0get a subscription for the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: id: STRING
HIGHsdk/python/polar/v2026_04/organizations.py0list meters of the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: meter_id: fiSTRING
HIGHsdk/python/polar/v2026_04/customer_portal/wallets.py0list meters of the authenticated customer. **scopes**: `customer_portal:read` `customer_portal:write` args: meter_id: fiSTRING
1 more matches not shown…
Deep Nesting290 hits · 271 pts
SeverityFileLineSnippetContext
LOWserver/polar/middlewares.py22CODE
LOWserver/polar/organization/service.py1849CODE
LOWserver/polar/organization/tasks.py354CODE
LOWserver/polar/organization/tasks.py549CODE
LOWserver/polar/organization/tasks.py908CODE
LOWserver/polar/organization/tasks.py1036CODE
LOWserver/polar/organization/resolver.py24CODE
LOWserver/polar/webhook/service.py230CODE
LOWserver/polar/event_type/service.py42CODE
LOWserver/polar/order/service.py1625CODE
LOWserver/polar/order/service.py1825CODE
LOWserver/polar/order/repository.py397CODE
LOWserver/polar/metrics/service.py59CODE
LOWserver/polar/metrics/service.py81CODE
LOWserver/polar/metrics/service.py553CODE
LOWserver/polar/metrics/queries_tinybird.py55CODE
LOWserver/polar/metrics/queries_tinybird.py117CODE
LOWserver/polar/transaction/service/dispute.py61CODE
LOWserver/polar/transaction/service/refund.py61CODE
LOWserver/polar/transaction/service/refund.py181CODE
LOWserver/polar/eventstream/endpoints.py26CODE
LOWserver/polar/eventstream/endpoints.py57CODE
LOWserver/polar/custom_field/service.py41CODE
LOWserver/polar/checkout_link/service.py50CODE
LOWserver/polar/merchant_migration/precheck.py619CODE
LOWserver/polar/merchant_migration/precheck.py93CODE
LOWserver/polar/oauth2/userinfo.py10CODE
LOWserver/polar/organization_access_token/service.py47CODE
LOW…rver/polar/customer_portal/endpoints/oauth_accounts.py117CODE
LOWserver/polar/customer_portal/service/subscription.py67CODE
LOWserver/polar/customer_portal/service/order.py66CODE
LOWserver/polar/customer_portal/service/benefit_grant.py45CODE
LOWserver/polar/customer_portal/service/benefit_grant.py154CODE
LOWserver/polar/kit/pagination.py151CODE
LOWserver/polar/kit/pagination.py197CODE
LOWserver/polar/tax/repository.py33CODE
LOWserver/polar/user/service.py257CODE
LOWserver/polar/models/refund.py111CODE
LOWserver/polar/backoffice/forms.py598CODE
LOWserver/polar/backoffice/static_urls.py6CODE
LOWserver/polar/backoffice/customers/endpoints.py61CODE
LOWserver/polar/backoffice/customers/endpoints.py128CODE
LOWserver/polar/backoffice/customers/endpoints.py509CODE
LOWserver/polar/backoffice/customers/endpoints.py642CODE
LOWserver/polar/backoffice/customers/endpoints.py697CODE
LOWserver/polar/backoffice/customers/endpoints.py749CODE
LOWserver/polar/backoffice/customers/endpoints.py817CODE
LOWserver/polar/backoffice/customers/endpoints.py887CODE
LOWserver/polar/backoffice/tasks/forms.py40CODE
LOWserver/polar/backoffice/tasks/forms.py69CODE
LOWserver/polar/backoffice/tasks/endpoints.py29CODE
LOWserver/polar/backoffice/tasks/endpoints.py90CODE
LOWserver/polar/backoffice/products/endpoints.py30CODE
LOWserver/polar/backoffice/products/endpoints.py75CODE
LOWserver/polar/backoffice/products/endpoints.py157CODE
LOWserver/polar/backoffice/payout_accounts/endpoints.py54CODE
LOWserver/polar/backoffice/payout_accounts/endpoints.py149CODE
LOWserver/polar/backoffice/external_events/endpoints.py39CODE
LOWserver/polar/backoffice/external_events/endpoints.py147CODE
LOWserver/polar/backoffice/external_events/endpoints.py187CODE
230 more matches not shown…
Modern Structural Boilerplate162 hits · 164 pts
SeverityFileLineSnippetContext
LOWserver/polar/tasks.py43__all__ = [CODE
LOWserver/polar/openapi.py98def set_openapi_generator(app: FastAPI) -> None:CODE
LOWserver/polar/openapi.py127__all__ = [CODE
LOWserver/polar/logfire.py231__all__ = [CODE
LOWserver/polar/redis.py39__all__ = [CODE
LOWserver/polar/routing.py29__all__ = ["APIRouter"]CODE
LOWserver/polar/postgres.py109__all__ = [CODE
LOWserver/polar/rate_limit.py280__all__ = [CODE
LOWserver/polar/sentry.py81def set_sentry_user(auth_subject: AuthSubject[Subject]) -> None:CODE
LOWserver/polar/event_type/__init__.py3__all__ = ["EventTypeRepository"]CODE
LOWserver/polar/order/tasks.py178async def update_product_benefits_grants(product_id: uuid.UUID) -> None:CODE
LOWserver/polar/metrics/metrics.py1006__all__ = [CODE
LOWserver/polar/metrics/cache.py89async def set_cached_metrics(redis: Redis, key: str, response: MetricsResponse) -> None:CODE
LOWserver/polar/transaction/fees/stripe/__init__.py75__all__ = ["get_reverse_stripe_payout_fees", "get_stripe_account_fee", "round_stripe"]CODE
LOWserver/polar/account_credit/__init__.py3__all__ = ["account_credit_service"]CODE
LOWserver/polar/merchant_migration/adapters/__init__.py4__all__ = ["SourceAdapter", "StripeAdapter"]CODE
LOWserver/polar/auth/models.py147__all__ = [CODE
LOWserver/polar/auth/exception_handlers.py17__all__ = ["PolarAuthRedirectionError", "auth_redirection_error_exception_handler"]CODE
LOWserver/polar/auth/routing.py88__all__ = ["DocumentedAuthSubjectAPIRoute"]CODE
LOWserver/polar/member/__init__.py3__all__ = ["Member", "MemberCreate", "MemberOwnerCreate"]CODE
LOWserver/polar/oauth2/exception_handlers.py15__all__ = ["OAuth2Error", "oauth2_error_exception_handler"]CODE
LOWserver/polar/oauth2/userinfo.py35__all__ = ["UserInfo", "generate_user_info"]CODE
LOWserver/polar/oauth2/exceptions.py45__all__ = ["InsufficientScopeError", "InvalidTokenError"]CODE
LOWserver/polar/oauth2/grants/__init__.py31__all__ = ["AuthorizationCodeGrant", "CodeChallenge", "register_grants"]CODE
LOWserver/polar/kit/cors.py78__all__ = ["CORSConfig", "CORSMatcherMiddleware", "Scope"]CODE
LOWserver/polar/kit/routing.py206__all__ = [CODE
LOWserver/polar/kit/email.py48__all__ = ["EmailNotValidError", "EmailStrDNS", "unalias_email", "validate_email"]CODE
LOWserver/polar/kit/repository/__init__.py11__all__ = [CODE
LOWserver/polar/kit/extensions/sqlalchemy/__init__.py4__all__ = ["IntEnum", "StringEnum", "sql"]CODE
LOWserver/polar/kit/extensions/sqlalchemy/sql.py8__all__ = [CODE
LOWserver/polar/kit/db/postgres.py127__all__ = [CODE
LOWserver/polar/kit/db/models/__init__.py3__all__ = ["IDModel", "Model", "RateLimitGroupMixin", "RecordModel", "TimestampedModel"]CODE
LOWserver/polar/kit/db/models/base.py54 def set_modified_at(self) -> None:CODE
LOWserver/polar/kit/db/models/base.py57 def set_deleted_at(self) -> None:CODE
LOWserver/polar/tax/tax_id.py526__all__ = [CODE
LOWserver/polar/tax/calculation/__init__.py208__all__ = [CODE
LOWserver/polar/models/user.py163 async def set_tokens(self, *, access_token: str, refresh_token: str | None) -> None:CODE
LOWserver/polar/models/product_price.py438def set_identity(instance: ProductPrice, *arg: Any, **kw: Any) -> None:CODE
LOWserver/polar/models/subscription.py524 def update_net_amount_from(self, charge: "Order | Checkout") -> None:CODE
LOWserver/polar/models/subscription.py543 def update_meters(self, prices: Sequence["SubscriptionProductPrice"]) -> None:CODE
LOWserver/polar/models/organization.py745 def set_status(self, status: OrganizationStatus) -> None:CODE
LOWserver/polar/models/order.py368 def update_refunds(self, refunded_amount: int, refunded_tax_amount: int) -> None:CODE
LOWserver/polar/models/__init__.py121__all__ = [CODE
LOWserver/polar/models/oauth2_client.py127 async def set_client_secret(self, client_secret: str) -> None:CODE
LOWserver/polar/models/oauth2_client.py151 def set_client_secret_sync(self, client_secret: str) -> None:CODE
LOWserver/polar/models/benefit_grant.py205 def set_granted(self) -> None:CODE
LOWserver/polar/models/benefit_grant.py210 def set_revoked(self) -> None:CODE
LOWserver/polar/models/benefit_grant.py215 def set_grant_failed(self, error: Exception) -> None:CODE
LOWserver/polar/backoffice/__init__.py78__all__ = ["app"]CODE
LOWserver/polar/backoffice/toast.py48__all__ = ["add_toast", "render_toasts"]STRING
LOWserver/polar/backoffice/customers/__init__.py3__all__ = ["router"]CODE
LOWserver/polar/backoffice/organizations_v2/endpoints.py4643__all__ = ["router"]CODE
LOW…r/polar/backoffice/organizations_v2/views/list_view.py881__all__ = ["OrganizationListView"]CODE
LOW…polar/backoffice/organizations_v2/views/detail_view.py916__all__ = ["OrganizationDetailView"]CODE
LOW…ce/organizations_v2/views/sections/overview_section.py769__all__ = ["OverviewSection"]CODE
LOW…ice/organizations_v2/views/sections/reviews_section.py217__all__ = ["ReviewsSection"]CODE
LOW…ce/organizations_v2/views/sections/settings_section.py485__all__ = ["SettingsSection"]CODE
LOW…rganizations_v2/views/sections/support_case_section.py777__all__ = ["SupportCaseSection"]CODE
LOW…fice/organizations_v2/views/sections/review_section.py293__all__ = ["ReviewSection"]CODE
LOW…ations_v2/views/sections/support_cases_list_section.py96__all__ = ["SupportCasesListSection"]CODE
102 more matches not shown…
Excessive Try-Catch Wrapping136 hits · 147 pts
SeverityFileLineSnippetContext
LOWserver/polar/middlewares.py233 except Exception as exc:CODE
LOWserver/polar/organization/service.py679 except Exception as e:CODE
LOWserver/polar/organization/schemas.py307 except Exception:CODE
LOWserver/polar/webhook/tasks.py290 except Exception as e:CODE
LOWserver/polar/external_event/service.py73 except Exception:CODE
LOWserver/polar/order/service.py367 except Exception:CODE
LOWserver/polar/order/service.py1170 except Exception:CODE
LOWserver/polar/order/service.py2022 except Exception as exc:CODE
LOWserver/polar/order/service.py2190 except Exception:CODE
LOWserver/polar/order/service.py2562 except Exception as e:CODE
LOWserver/polar/order/service.py2775 except Exception as e:CODE
LOWserver/polar/transaction/service/dispute.py275 except Exception as e:CODE
LOWserver/polar/transaction/service/refund.py175 except Exception as e:CODE
LOWserver/polar/transaction/service/refund.py274 except Exception as e:CODE
LOWserver/polar/auth/routing.py26 except Exception:CODE
LOWserver/polar/kit/currency.py148 except Exception:CODE
LOW…ver/polar/backoffice/organizations_v2/orders_import.py408 except Exception:CODE
LOWserver/polar/backoffice/organizations_v2/endpoints.py366 except Exception:CODE
LOWserver/polar/backoffice/organizations_v2/endpoints.py2561 except Exception as e:CODE
LOWserver/polar/backoffice/organizations_v2/endpoints.py3822 except Exception as e:CODE
LOWserver/polar/backoffice/organizations_v2/endpoints.py3861 except Exception as e:CODE
LOW…ice/organizations_v2/views/sections/reviews_section.py136 except Exception:CODE
LOWserver/polar/backoffice/email_logs/endpoints.py169 except Exception:CODE
LOWserver/polar/backoffice/benefits/endpoints.py186 except Exception:CODE
LOWserver/polar/backoffice/orders/endpoints.py283 except Exception:CODE
LOWserver/polar/backoffice/orders/endpoints.py293 except Exception:CODE
LOWserver/polar/backoffice/orders/endpoints.py810 except Exception as e:CODE
LOWserver/polar/backoffice/orders/endpoints.py979 except Exception as e:CODE
LOWserver/polar/observability/s3_span_exporter.py90 except Exception:CODE
LOWserver/polar/observability/memory_profile.py148 except Exception as e:CODE
LOWserver/polar/observability/remote_write.py194 except Exception as e:CODE
LOWserver/polar/observability/remote_write.py241 except Exception as e:CODE
LOWserver/polar/observability/slo.py109 except Exception:CODE
LOWserver/polar/observability/slo_report/tasks.py87 except Exception as e:CODE
LOWserver/polar/checkout/service.py1378 except Exception as e:CODE
LOWserver/polar/checkout/service.py1439 except Exception as e:CODE
LOWserver/polar/checkout/service.py1558 except Exception as e:CODE
LOWserver/polar/subscription/scheduler.py35 except Exception as e:CODE
LOWserver/polar/integrations/plain/service.py185 except Exception:STRING
LOWserver/polar/integrations/github/service/user.py38 except Exception as e:CODE
LOW…olar/integrations/github_repository_benefit/service.py276 except Exception as e:CODE
LOWserver/polar/integrations/tinybird/service.py686 except Exception as e:CODE
LOWserver/polar/integrations/tinybird/service.py1337 except Exception as e:CODE
LOWserver/polar/integrations/tinybird/client.py87 except Exception:CODE
LOWserver/polar/integrations/resend/endpoints.py48 except Exception:CODE
LOWserver/polar/receipt/render.py67 except Exception:CODE
MEDIUMserver/polar/receipt/render.py59def main() -> int:CODE
LOWserver/polar/support_case/pdf.py31 except Exception:CODE
LOWserver/polar/support_case/pdf.py40 except Exception:CODE
LOWserver/polar/organization_review/analyzer.py718 except Exception as e:CODE
LOWserver/polar/organization_review/policy.py57 except Exception:CODE
LOWserver/polar/organization_review/policy.py113 except Exception as e:CODE
LOWserver/polar/organization_review/schemas.py220 except Exception:CODE
LOWserver/polar/organization_review/agent.py107 except Exception as e:CODE
LOWserver/polar/organization_review/agent.py254 except Exception as e:CODE
LOWserver/polar/organization_review/agent.py328 except Exception as e:CODE
LOWserver/polar/organization_review/collectors/feedback.py35 except Exception:CODE
LOWserver/polar/organization_review/collectors/setup.py38 except Exception:CODE
LOWserver/polar/organization_review/collectors/setup.py139 except Exception:CODE
LOWserver/polar/organization_review/collectors/setup.py170 except Exception:CODE
76 more matches not shown…
Fake / Example Data132 hits · 134 pts
SeverityFileLineSnippetContext
LOWclients/apps/orbit/src/app/components/input/page.tsx79 name: 'placeholder',CODE
LOWclients/apps/orbit/src/app/components/textarea/page.tsx75 name: 'placeholder',CODE
LOWclients/apps/app/targets/widget/widgets.swift16 return SimpleEntry(date: Date(), configuration: ConfigurationAppIntent(), metricValue: 425, metricValueDouble: nCODE
LOWclients/apps/app/targets/widget/widgets.swift872 SimpleEntry(date: .now, configuration: config, metricValue: 425, metricValueDouble: nil, organizationName: "Acme IncCODE
LOW…rc/components/Settings/OrganizationProfileSettings.tsx301 placeholder="Acme Inc"CODE
LOW…ients/apps/web/src/components/Landing/CostInsights.tsx16 name: 'Jane Doe',CODE
LOW…ients/apps/web/src/components/Landing/CostInsights.tsx23 name: 'John Doe',CODE
LOWclients/apps/web/src/components/Landing/Pipeline.tsx181 name="John Doe"CODE
LOWserver/polar/member/schemas.py25_name_example = "Jane Doe"CODE
LOWserver/polar/backoffice/organizations_v2/endpoints.py1336 "placeholder": "Why are you denying this organization?",CODE
LOWserver/polar/backoffice/organizations_v2/endpoints.py1481 "placeholder": reason_placeholder,CODE
LOWserver/polar/backoffice/organizations_v2/endpoints.py2023 "placeholder": reason_placeholder,CODE
LOW…r/polar/backoffice/organizations_v2/views/list_view.py481 "placeholder": ("Search organizations by name or slug..."),CODE
LOWserver/polar/customer/schemas/customer.py54_name_example = "John Doe"CODE
LOWserver/emails/src/preview.ts85 billing_name: 'John Doe',CODE
LOWserver/emails/src/preview.ts87 line1: '123 Main Street',CODE
LOWserver/emails/src/emails/webhook_endpoint_disabled.tsx60 email: 'admin@example.com',CODE
LOWserver/emails/src/emails/notification_new_sale.tsx64 billing_address_line1: '123 Main St',CODE
LOW…er/emails/src/emails/notification_new_subscription.tsx40 subscriber_name: 'John Doe',CODE
LOWserver/emails/src/emails/organization_offboarded.tsx42 email: 'admin@example.com',CODE
LOWserver/tests/organization/test_schemas.py82 "Acme Inc",CODE
LOWserver/tests/order/test_service.py2517 billing_name="John Doe",CODE
LOWserver/tests/order/test_service.py2597 billing_name="John Doe",CODE
LOWserver/tests/order/test_service.py2618 billing_name="John Doe",CODE
LOWserver/tests/order/test_service.py2640 billing_name="John Doe",CODE
LOWserver/tests/order/test_service.py2676 billing_name="John Doe",CODE
LOWserver/tests/order/test_service.py2696 billing_name="John Doe",CODE
LOWserver/tests/order/test_service.py2717 billing_name="John Doe",CODE
LOWserver/tests/order/test_service.py2739 billing_name="John Doe",CODE
LOWserver/tests/order/test_service.py2769 billing_name="John Doe",CODE
LOWserver/tests/order/test_service.py2796 billing_name="John Doe",CODE
LOWserver/tests/member/test_repository.py113 save_fixture, organization=organization, email="user@example.com"CODE
LOWserver/tests/member/test_repository.py118 email="user@example.com",CODE
LOW…sts/customer_portal/endpoints/test_customer_session.py91 save_fixture, organization=organization, email="user@example.com"CODE
LOW…sts/customer_portal/endpoints/test_customer_session.py349 save_fixture, organization=organization, email="user@example.com"CODE
LOW…sts/customer_portal/endpoints/test_customer_session.py354 email="user@example.com",CODE
LOW…tests/customer_portal/service/test_customer_session.py107 save_fixture, organization=organization, email="user@example.com"CODE
LOW…tests/customer_portal/service/test_customer_session.py202 save_fixture, organization=organization, email="user@example.com"CODE
LOW…tests/customer_portal/service/test_customer_session.py207 email="user@example.com",CODE
LOW…er/tests/customer_portal/service/test_benefit_grant.py553 properties={"invited_email": "admin@example.com"},CODE
LOW…er/tests/customer_portal/service/test_benefit_grant.py559 "invited_email": "admin@example.com",CODE
LOW…er/tests/customer_portal/service/test_benefit_grant.py605 properties={"invited_email": "admin@example.com"},CODE
LOW…er/tests/customer_portal/service/test_benefit_grant.py612 "invited_email": "admin@example.com",CODE
LOW…er/tests/customer_portal/service/test_benefit_grant.py646 "invited_email": "admin@example.com",CODE
LOW…er/tests/customer_portal/service/test_benefit_grant.py657 properties={"invited_email": "admin@example.com"},CODE
LOW…er/tests/customer_portal/service/test_benefit_grant.py664 "invited_email": "admin@example.com",CODE
LOWserver/tests/kit/test_anonymization.py36 result = anonymize_email_for_deletion("user@example.com", created_at)CODE
LOWserver/tests/kit/test_anonymization.py42 email = "user@example.com"CODE
LOWserver/tests/kit/test_anonymization.py52 email = "user@example.com"CODE
LOWserver/tests/tax/calculation/test_numeral.py16 line1="123 Main St",CODE
LOWserver/tests/tax/calculation/test_stripe.py16 line1="123 Main St",CODE
LOWserver/tests/models/test_oauth_account.py16 account_email="foo@bar.com",CODE
LOW…s/observability/observability/test_s3_span_exporter.py166 "attributes": {"Email": "test@test.com", "USERNAME": "test"},CODE
LOWserver/tests/checkout/test_service.py2812 "customer_name": "John Doe",CODE
LOWserver/tests/checkout/test_service.py2815 "company": "Acme Inc",CODE
LOWserver/tests/checkout/test_service.py2822 assert checkout.customer_name == "John Doe"CODE
LOWserver/tests/checkout/test_service.py2824 assert checkout.custom_field_data == {"company": "Acme Inc"}CODE
LOWserver/tests/checkout/test_service.py5769 "line1": "123 Main St",CODE
LOWserver/tests/checkout/test_service.py4614 "line1": "123 Main St",CODE
LOWserver/tests/checkout/test_service.py5062 "line1": "123 Main St",CODE
72 more matches not shown…
AI Structural Patterns102 hits · 98 pts
SeverityFileLineSnippetContext
LOWserver/polar/webhook/endpoints.py167CODE
LOWserver/polar/event_type/service.py42CODE
LOWserver/polar/event_type/endpoints.py25CODE
LOWserver/polar/order/service.py371CODE
LOWserver/polar/order/endpoints.py63CODE
LOWserver/polar/metrics/endpoints.py58CODE
LOWserver/polar/metrics/endpoints.py153CODE
LOWserver/polar/checkout_link/endpoints.py160CODE
LOWserver/polar/auth/service.py64CODE
LOWserver/polar/auth/oauth2/router.py79CODE
LOWserver/polar/auth/sso/endpoints.py185CODE
LOWserver/polar/payment/service.py47CODE
LOWserver/polar/payment/endpoints.py30CODE
LOWserver/polar/customer_portal/endpoints/benefit_grant.py56CODE
LOWserver/polar/customer_portal/service/benefit_grant.py45CODE
LOWserver/polar/kit/html.py22CODE
LOWserver/polar/kit/csv.py57CODE
LOWserver/polar/kit/db/postgres.py47CODE
LOWserver/polar/kit/db/postgres.py81CODE
LOWserver/polar/backoffice/organizations_v2/endpoints.py432CODE
LOW…r/polar/backoffice/organizations_v2/views/list_view.py341CODE
LOWserver/polar/backoffice/support_cases/queries.py44CODE
LOWserver/polar/product/service.py72CODE
LOWserver/polar/product/endpoints.py53CODE
LOWserver/polar/checkout/service.py258CODE
LOWserver/polar/subscription/service.py345CODE
LOWserver/polar/subscription/endpoints.py63CODE
LOWserver/polar/email_update/endpoints.py63CODE
LOWserver/polar/meter/endpoints.py103CODE
LOWserver/polar/event/service.py84CODE
LOWserver/polar/event/service.py285CODE
LOWserver/polar/event/tinybird_repository.py106CODE
LOWserver/polar/event/tinybird_repository.py222CODE
LOWserver/polar/event/tinybird_repository.py267CODE
LOWserver/polar/event/tinybird_repository.py393CODE
LOWserver/polar/event/endpoints.py71CODE
LOWserver/polar/event/endpoints.py218CODE
LOWserver/polar/event/endpoints.py274CODE
LOWserver/polar/event/endpoints.py326CODE
LOWserver/polar/event/endpoints.py383CODE
LOWserver/polar/refund/service.py115CODE
LOWserver/polar/refund/endpoints.py25CODE
LOWserver/polar/benefit/service.py36CODE
LOWserver/tests/metrics/test_tinybird_metrics.py1090CODE
LOWserver/tests/transaction/conftest.py31CODE
LOWserver/tests/merchant_migration/test_precheck.py101CODE
LOWserver/tests/integrations/polar/test_service.py1958CODE
LOWserver/tests/scripts/test_reingest_missing_events.py24CODE
LOWserver/tests/organization_review/test_feedback.py111CODE
LOWserver/tests/refund/test_service.py125CODE
LOWserver/scripts/preview.py1159CODE
LOWsdk/python/polar/v2026_04/payments.py22CODE
LOWsdk/python/polar/v2026_04/payments.py82CODE
LOWsdk/python/polar/v2026_04/payments.py176CODE
LOWsdk/python/polar/v2026_04/payments.py236CODE
LOWsdk/python/polar/v2026_04/checkouts.py35CODE
LOWsdk/python/polar/v2026_04/checkouts.py92CODE
LOWsdk/python/polar/v2026_04/checkouts.py369CODE
LOWsdk/python/polar/v2026_04/checkouts.py426CODE
LOWsdk/python/polar/v2026_04/events.py31CODE
42 more matches not shown…
Structural Annotation Overuse49 hits · 92 pts
SeverityFileLineSnippetContext
LOW…s/apps/web/e2e/healing/prompts/e2e-checkout-healing.md17### Step 1: Read the failing testCOMMENT
LOW…s/apps/web/e2e/healing/prompts/e2e-checkout-healing.md21### Step 2: Reproduce the test manuallyCOMMENT
LOW…s/apps/web/e2e/healing/prompts/e2e-checkout-healing.md37### Step 3: Classify the failureCOMMENT
LOW…s/apps/web/e2e/healing/prompts/e2e-checkout-healing.md45### Step 4: Take action based on classificationCOMMENT
LOW…s/apps/web/e2e/healing/prompts/e2e-checkout-healing.md114### Step 5: Check for suspicious recent PRsCOMMENT
LOW.agents/skills/interview-task/SKILL.md19## Step 1: fork the Polar repository to a private GitHub repository dedicated to the candidateCOMMENT
LOW.agents/skills/interview-task/SKILL.md33## Step 2: create a branch for the PRCOMMENT
LOW.agents/skills/interview-task/SKILL.md43## Step 3: make changes to the codebase using LLM agentCOMMENT
LOW.agents/skills/interview-task/SKILL.md47## Step 4: create a pull requestCOMMENT
LOW.agents/skills/interview-task/SKILL.md55## Step 5: add a comment to the PR asking the candidate to review itCOMMENT
LOW.agents/skills/handbook-backend-development/SKILL.md14## Step 1: Create the fileCOMMENT
LOW.agents/skills/handbook-backend-development/SKILL.md39## Step 2: Explore and draft the content of the entryCOMMENT
LOW.agents/skills/handbook-backend-development/SKILL.md43## Step 3: Ask for feedbackCOMMENT
LOW.agents/skills/render-env/SKILL.md36## Step 1: Add the tfe_variable to each global/{env}.tfCOMMENT
LOW.agents/skills/render-env/SKILL.md54## Step 2: Add the variable {} block to each {env}/variables.tfCOMMENT
LOW.agents/skills/render-env/SKILL.md68## Step 3: FormatCOMMENT
LOW.agents/skills/render-env/SKILL.md78## Step 4: Hand offCOMMENT
LOW.agents/skills/fix-sentry/SKILL.md16## Step 1: Analyze the Sentry issueCOMMENT
LOW.agents/skills/fix-sentry/SKILL.md20## Step 2: correlate with Logfire logsCOMMENT
LOW.agents/skills/fix-sentry/SKILL.md28## Step 3: Search source codeCOMMENT
LOW.agents/skills/fix-sentry/SKILL.md32### Step 4: Analyze findingsCOMMENT
LOW.agents/skills/fix-sentry/SKILL.md36## Step 5: Implement a fixCOMMENT
LOW.agents/skills/add-locale/SKILL.md19## Step 1: Sync mainCOMMENT
LOW.agents/skills/add-locale/SKILL.md28## Step 2: Create the branchCOMMENT
LOW.agents/skills/add-locale/SKILL.md34## Step 3: Register the localeCOMMENT
LOW.agents/skills/add-locale/SKILL.md48## Step 4: Generate the translation fileCOMMENT
LOW.agents/skills/add-locale/SKILL.md62## Step 5: Wire the locale into the i18n entrypointCOMMENT
LOW.agents/skills/add-locale/SKILL.md80## Step 6: Update the public docsCOMMENT
LOW.agents/skills/add-locale/SKILL.md94## Step 7: Hand back to the userCOMMENT
LOWserver/polar/integrations/plain/service.py1348 # Step 1: Try read-only lookup by email (handles legacy customers)COMMENT
LOWserver/polar/integrations/plain/service.py1357 # Step 2: Not found by email - upsert with external_id as identifierCOMMENT
LOWserver/tests/scripts/test_restore_oneoff_grants.py939 # Step 1: FindCOMMENT
LOWserver/tests/scripts/test_restore_oneoff_grants.py944 # Step 2: RestoreCOMMENT
LOWserver/tests/scripts/test_restore_oneoff_grants.py953 # Step 3: Verify grantCOMMENT
LOWserver/tests/scripts/test_restore_oneoff_grants.py961 # Step 4: Verify license keyCOMMENT
LOWserver/tests/scripts/test_restore_oneoff_grants.py968 # Step 5: Running find again should return nothingCOMMENT
LOWserver/tests/customer_seat/test_service.py2757 # Step 1: Assign a seat to the email (this creates a member)COMMENT
LOWserver/tests/customer_seat/test_service.py2764 # Step 2: Revoke the seat (this clears member_id, customer_id, email from seat)COMMENT
LOWserver/tests/customer_seat/test_service.py2771 # Step 3: Soft delete the memberCOMMENT
LOWserver/tests/customer_seat/test_service.py2784 # Step 4: Try to assign a new seat to the same emailCOMMENT
LOWserver/scripts/migrate_organizations_members.py195 # Step 1: Enable member_model_enabledCOMMENT
LOWserver/scripts/migrate_organizations_members.py208 # Step 2: Run backfill steps directlyCOMMENT
LOWserver/scripts/tax_filing_imports.py233 # Step 1: Count rowsCOMMENT
LOWserver/scripts/tax_filing_imports.py239 # Step 2: Load CSVCOMMENT
LOWserver/scripts/tax_filing_imports.py246 # Step 3: Process batchesCOMMENT
LOWdev/cli/up_steps/09_configure_integrations.py151 # Step 1: Install Stripe CLICOMMENT
LOWdev/cli/up_steps/09_configure_integrations.py165 # Step 2: Log in to StripeCOMMENT
LOWdev/cli/up_steps/09_configure_integrations.py185 # Step 3: Fetch API keysCOMMENT
LOWdev/cli/up_steps/09_configure_integrations.py198 # Step 4: Get webhook secretCOMMENT
Cross-Language Confusion18 hits · 75 pts
SeverityFileLineSnippetContext
HIGHserver/polar/product/schemas.py653 "If null, it defaults to the organization's default tax behavior."CODE
HIGHserver/polar/meter/filter.py84 # Otherwise return falseCOMMENT
HIGHserver/polar/meter/filter.py93 # Otherwise return falseCOMMENT
HIGHserver/tests/dispute/test_service.py174 # Stripe drops network_reason_code and evidence_details.due_by when null,COMMENT
HIGHserver/scripts/backfill_customer_name.py58 null, so its orders get a null ``billing_name`` and can never produce anSTRING
HIGHserver/scripts/snooze_stale_reviews.py144 ELSE internal_notes || E'\\n\\n' || :noteCODE
HIGHserver/scripts/reset_unconfigured_grandfathered_orgs.py274 ELSE internal_notes || E'\\n\\n' || :noteCODE
HIGHserver/scripts/backfill_order_billing_name.py55 ``billing_address``) being non-null, so orders snapshotted from a namelessSTRING
HIGHsdk/python/polar/v2026_04/outputs.py5725 """The tax behavior of the price. If null, it defaults to the organization's default tax behavior."""STRING
HIGHsdk/python/polar/v2026_04/outputs.py5773 """The tax behavior of the price. If null, it defaults to the organization's default tax behavior."""STRING
HIGHsdk/python/polar/v2026_04/outputs.py7942 """The tax behavior of the price. If null, it defaults to the organization's default tax behavior."""STRING
HIGHsdk/python/polar/v2026_04/outputs.py7981 """The tax behavior of the price. If null, it defaults to the organization's default tax behavior."""STRING
HIGHsdk/python/polar/v2026_04/outputs.py8033 """The tax behavior of the price. If null, it defaults to the organization's default tax behavior."""STRING
HIGHsdk/python/polar/v2026_04/outputs.py8074 """The tax behavior of the price. If null, it defaults to the organization's default tax behavior."""STRING
HIGHsdk/generator/typescript/types.py27 return f"({inner} | null)"CODE
HIGHsdk/generator/generator/release.py21 cmd = "set -o pipefail && uv run -m --directory ../../server scripts.generate_openapi | jq -r"CODE
HIGHsdk/generator/generator/ir.py79 Produced by the anyOf: [{...}, {type: null}] pattern that is dominant inSTRING
HIGHdev/cli/up_steps/02_setup_node.py147 console.print("Run: [bold]source ~/.nvm/nvm.sh && nvm use[/bold]")CODE
Redundant / Tautological Comments42 hits · 64 pts
SeverityFileLineSnippetContext
LOWserver/polar/organization/tasks.py611 # Check if grant belongs to an old seat-holder customerCOMMENT
LOWserver/polar/organization/tasks.py785 # Check if customer has any subscriptionsCOMMENT
LOWserver/polar/organization/tasks.py797 # Check if customer has any ordersCOMMENT
LOWserver/polar/organization/endpoints.py517 # Check if user is already member of organizationCOMMENT
LOWserver/polar/organization/endpoints.py594 # Check if user is the only memberCOMMENT
LOWserver/polar/webhook/service.py397 # Check if all recent events are failuresCOMMENT
LOWserver/polar/member/service.py798 # Check if caller has permission to transfer ownershipCOMMENT
LOWserver/polar/oauth2/authorization_server.py90 # Check if this is a public client (token_endpoint_auth_method = none)COMMENT
LOWserver/polar/oauth2/authorization_server.py154 # Check if this is a public client (token_endpoint_auth_method = none)COMMENT
LOWserver/polar/oauth2/grants/authorization_code.py339 # Check if the sub has granted the requested scope or a subset of itCOMMENT
LOWserver/polar/models/subscription.py554 # Check if the meter already exists in the subscriptionCOMMENT
LOWserver/polar/backoffice/users/endpoints.py648 # Check if user can be deletedCOMMENT
LOWserver/polar/backoffice/orders/endpoints.py776 # Check if order can be refundedCOMMENT
LOWserver/polar/backoffice/orders/endpoints.py965 # Check if order can be voidedCOMMENT
LOWserver/polar/cli/endpoints.py40 # Check if this is a webhook eventCOMMENT
LOWserver/polar/observability/utils.py15 # Check if app is excluded (e.g., backoffice)COMMENT
LOWserver/polar/observability/slo.py118 # Check if p99 exceeds target for any critical endpoint:STRING
LOWserver/polar/billing_entry/service.py121 # Check if this meter uses a non-summable aggregationCOMMENT
LOWserver/polar/subscription/service.py887 # Check if discount is still applicableCOMMENT
LOWserver/polar/worker/_debounce.py71 # Set TTL to avoid keys being stuck in RedisCOMMENT
LOWserver/polar/customer_seat/service.py1039 # Check if seat already assigned to this customerCOMMENT
LOWserver/polar/meter/service.py230 # Check if meter is attached to any active ProductPriceMeteredUnitCOMMENT
LOWserver/polar/meter/service.py254 # Check if meter is referenced by any active Benefits with meter_credit typeCOMMENT
LOWserver/polar/refund/service.py314 # Check if there are disputes to linkCOMMENT
LOWserver/tests/order/test_service.py5015 # Set organization to use customer-based invoice numberingCOMMENT
LOWserver/tests/member/test_service.py367 # Set name to None after creationCOMMENT
LOW…sts/customer_portal/endpoints/test_customer_session.py393 # Set name to NoneCOMMENT
LOWserver/scripts/void_eligible_orders.py132 # Check if order is still pending (might have changed since query)COMMENT
LOW…ver/scripts/transfer_products_between_organizations.py140 # Check if all products belong to the same organizationCOMMENT
LOW…ver/scripts/transfer_products_between_organizations.py218 # Check if customer has orders for non-transferring productsCOMMENT
LOW…ver/scripts/transfer_products_between_organizations.py233 # Check if customer has subscriptions for non-transferring productsCOMMENT
LOW…ver/scripts/transfer_products_between_organizations.py352 # Check if this discount is used by non-transferring productsCOMMENT
LOW…ver/scripts/transfer_products_between_organizations.py467 # Check if a customer with the same email already exists in target organizationCOMMENT
LOW…ver/scripts/transfer_products_between_organizations.py612 # Check if a customer with the same email already exists in target organizationCOMMENT
LOWserver/scripts/seeds_load.py1238 # Check if seed data already existsCOMMENT
LOWserver/scripts/plain_comm.py249 # Check if not already sentCOMMENT
LOWserver/scripts/backfill_missing_balance_order_event.py48 # Check if either event already existsCOMMENT
LOWdocs/update-schema.sh8# Check if jq is installedCOMMENT
LOWdocs/update-schema.sh14# Check if there is exactly one positional argumentCOMMENT
LOW.github/workflows/link_pr_to_issue.yaml44 # Check if the fix reference already exists in the descriptionCOMMENT
LOW.github/workflows/e2e_flakiness_analysis.yaml206 # Check if Claude created a PR (flaky fix)COMMENT
LOWdev/docker/scripts/startup.sh203 # Check if any organizations exist to determine if seeds are neededCOMMENT
Over-Commented Block43 hits · 42 pts
SeverityFileLineSnippetContext
LOWterraform/scripts/plan-diff.sh1#!/usr/bin/env bashCOMMENT
LOWterraform/modules/s3_buckets/main.tf101 }COMMENT
LOWclients/examples/checkout-components/next-env.d.ts1/// <reference types="next" />COMMENT
LOWclients/packages/orbit/src/tokens/tokens.stylex.ts1// ─── Public Token Barrel ──────────────────────────────────────────────────────COMMENT
LOWclients/packages/orbit/src/tokens/value.stylex.ts1// ─── Value Tokens (Tier 1 — Primitives) ───────────────────────────────────────COMMENT
LOWclients/apps/app/expo-env.d.ts1/// <reference types="expo/types" />COMMENT
LOW…web/src/app/(main)/feedback/question/dashboardPaths.ts1// Allowed dashboard paths for assistant deep-links. Each entry is appended toCOMMENT
LOWclients/apps/web/src/utils/planSavings.test.ts181 it('returns variable + fixed savings minus monthly plan cost', () => {COMMENT
LOWinfra/preview/setup-vm.sh1#!/usr/bin/env bashCOMMENT
LOWinfra/preview/deploy.sh181 log "Seed data already loaded, skipping"COMMENT
LOWinfra/preview/deploy.sh201 # NEXT_PUBLIC_FRONTEND_BASE_URL=${PREVIEW_URL}COMMENT
LOWserver/alembic.ini1# A generic, single database configuration.COMMENT
LOWserver/alembic.ini21# string value is passed to dateutil.tz.gettz()COMMENT
LOWserver/alembic.ini41# The path separator used here should be the separator specified by "version_path_separator" below.COMMENT
LOWserver/polar/tax/repository.py41 # Only US and Canada are reported at the state level; everywhere else isCOMMENT
LOWserver/polar/backoffice/middlewares.py61COMMENT
LOWserver/polar/backoffice/tasks/endpoints.py41 # if value is not None:COMMENT
LOWserver/polar/customer_meter/service.py161 # )COMMENT
LOWserver/polar/customer_meter/service.py201 # customer_id=str(customer.id),COMMENT
LOWserver/polar/customer_meter/service.py221 # if old_credit_ids != new_credit_ids:COMMENT
LOWserver/polar/integrations/aws/s3/schemas.py141 # S3 SHA-256 BASE64 validation for multipart upload is special.COMMENT
LOWserver/polar/compass/service.py61COMMENT
LOWserver/polar/authz/dependencies.py201 ),COMMENT
LOWserver/polar/startup_program/service.py101 return existingCOMMENT
LOWserver/polar/invoice/generator.py441 ) -> None:COMMENT
LOWserver/emails/tsconfig.json21 // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JCOMMENT
LOWserver/emails/tsconfig.json41 // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions inCOMMENT
LOWserver/emails/tsconfig.json61 // "noEmit": true, /* Disable emitting files from a compilation. */COMMENT
LOWserver/emails/tsconfig.json81 // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can COMMENT
LOWserver/emails/tsconfig.json101 // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly COMMENT
LOWserver/tests/subscription/test_service_prorations.py61# not a subscription in Stripe.COMMENT
LOWserver/tests/event/test_service.py1981 # session: AsyncSession,COMMENT
LOWserver/tests/event/test_service.py2001COMMENT
LOWserver/tests/event/test_service.py2021 # )COMMENT
LOWserver/scripts/seeds_load.py1681 # {COMMENT
LOWserver/scripts/seeds_load.py2181COMMENT
LOWsdk/python/README.md1# Polar Python SDKCOMMENT
LOW.github/workflows/deploy.yml41 # Why per-env: sandbox can be ahead of production (failed prod deployCOMMENT
LOW.github/workflows/deploy.yml81 # would silently emit "key=" (empty value) instead of aborting.COMMENT
LOW.github/workflows/deploy-environment.yml101 "${{ inputs.render-worker-service-ids }}"COMMENT
LOW.github/workflows/deploy-environment.yml161 env:COMMENT
LOWdev/cli/cli.py1#!/usr/bin/env -S uv run -sCOMMENT
LOWdev/cli/commands/snap.py81# a fixed base (env + server boot, both branches) plus per-URL. ONE shared,COMMENT
Verbosity Indicators20 hits · 40 pts
SeverityFileLineSnippetContext
LOWserver/polar/integrations/plain/service.py1348 # Step 1: Try read-only lookup by email (handles legacy customers)COMMENT
LOWserver/polar/integrations/plain/service.py1357 # Step 2: Not found by email - upsert with external_id as identifierCOMMENT
LOWserver/tests/scripts/test_restore_oneoff_grants.py939 # Step 1: FindCOMMENT
LOWserver/tests/scripts/test_restore_oneoff_grants.py944 # Step 2: RestoreCOMMENT
LOWserver/tests/scripts/test_restore_oneoff_grants.py953 # Step 3: Verify grantCOMMENT
LOWserver/tests/scripts/test_restore_oneoff_grants.py961 # Step 4: Verify license keyCOMMENT
LOWserver/tests/scripts/test_restore_oneoff_grants.py968 # Step 5: Running find again should return nothingCOMMENT
LOWserver/tests/customer_seat/test_service.py2757 # Step 1: Assign a seat to the email (this creates a member)COMMENT
LOWserver/tests/customer_seat/test_service.py2764 # Step 2: Revoke the seat (this clears member_id, customer_id, email from seat)COMMENT
LOWserver/tests/customer_seat/test_service.py2771 # Step 3: Soft delete the memberCOMMENT
LOWserver/tests/customer_seat/test_service.py2784 # Step 4: Try to assign a new seat to the same emailCOMMENT
LOWserver/scripts/migrate_organizations_members.py195 # Step 1: Enable member_model_enabledCOMMENT
LOWserver/scripts/migrate_organizations_members.py208 # Step 2: Run backfill steps directlyCOMMENT
LOWserver/scripts/tax_filing_imports.py233 # Step 1: Count rowsCOMMENT
LOWserver/scripts/tax_filing_imports.py239 # Step 2: Load CSVCOMMENT
LOWserver/scripts/tax_filing_imports.py246 # Step 3: Process batchesCOMMENT
LOWdev/cli/up_steps/09_configure_integrations.py151 # Step 1: Install Stripe CLICOMMENT
LOWdev/cli/up_steps/09_configure_integrations.py165 # Step 2: Log in to StripeCOMMENT
LOWdev/cli/up_steps/09_configure_integrations.py185 # Step 3: Fetch API keysCOMMENT
LOWdev/cli/up_steps/09_configure_integrations.py198 # Step 4: Get webhook secretCOMMENT
AI Slop Vocabulary10 hits · 23 pts
SeverityFileLineSnippetContext
MEDIUMclients/apps/web/src/utils/getResizedImage.ts27 // in an SSR/email environment we do this for simplicity and to leverage caching.COMMENT
MEDIUMclients/apps/web/src/components/Landing/Logotypes.tsx43// Duplicate for seamless marquee loopCOMMENT
LOWserver/polar/organization/tasks.py475 # else: no customer and no email — just set customer_id belowCOMMENT
MEDIUMserver/polar/organization_review/analyzer.py697 # A product-change review is a comprehensive re-review of anCOMMENT
LOWserver/polar/event/service.py1016 # events whose root_id was just set because an ancestor arrived inCOMMENT
MEDIUMserver/tests/metrics/test_tinybird_metrics.py1585 # The harness commits shared seed data once for speed, so it can't use theCOMMENT
MEDIUMserver/tests/metrics/test_service.py2325 # The harness commits shared seed data once for speed, so it can't use theCOMMENT
MEDIUMserver/tests/payout/test_endpoints.py106 # harness doesn't provide. The authz check raises before theCOMMENT
MEDIUMdev/cli/commands/status.py1"""Show comprehensive environment status."""STRING
MEDIUMdev/cli/commands/status.py147 """Show comprehensive environment status."""STRING
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALserver/polar/customer/repository.py59 customer_id = Customer.__table__.c.id.default.arg(None)CODE
Modern AI Meta-Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMserver/polar/worker/_broker.py223 # Group completion callbacks for orchestrating task sequencesCOMMENT
MEDIUMserver/tests/order/test_service.py6098 # here we only assert finalize's orchestration drives it with a paidCOMMENT
Dead Code2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMserver/tests/merchant_migration/test_endpoints.py295CODE
MEDIUMserver/tests/cli/test_endpoints.py183CODE
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWterraform/scripts/plan-diff.sh6# Usage:COMMENT
LOWinfra/preview/deploy.sh6# Usage:COMMENT
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWserver/polar/worker/_runner.py154async def run_task(CODE