Repository Analysis

microsoft/playwright-python

Python version of the Playwright testing and automation library.

26.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of microsoft/playwright-python, a Python project with 14,826 GitHub stars. SynthScan v2.0 examined 109,798 lines of code across 366 source files, recording 2740 pattern matches distributed across 14 syntactic categories. The overall adjusted score of 26.3 places this repository in the Moderate 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).

26.3
Adjusted Score
26.3
Raw Score
100%
Time Factor
2026-07-02
Last Push
14.8K
Stars
Python
Language
109.8K
Lines of Code
366
Files
2.7K
Pattern Hits
2026-07-14
Scan Date
0.23
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 2HIGH 82MEDIUM 13LOW 2643

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 2740 distinct pattern matches across 14 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 Identifiers2037 hits · 1937 pts
SeverityFileLineSnippetContext
LOWsetup.py192 def _download_and_extract_local_driver(CODE
LOWtests/server.py277 def send_on_web_socket_connection(self, data: bytes) -> None:CODE
LOWtests/server.py280 def once_web_socket_connection(CODE
LOWtests/utils.py27def chromium_version_less_than(a: str, b: str) -> bool:CODE
LOWtests/test_reference_count_async.py44 def handle_network_response_received(event: Any) -> None:CODE
LOWtests/test_reference_count_async.py90async def test_tracing_should_not_leak_protocol_callbacks(browser_name: str) -> None:CODE
LOWtests/async/test_page_select_option.py21async def test_select_option_should_select_single_option(CODE
LOWtests/async/test_page_select_option.py30async def test_select_option_should_select_single_option_by_value(CODE
LOWtests/async/test_page_select_option.py39async def test_select_option_should_select_single_option_by_label(CODE
LOWtests/async/test_page_select_option.py48async def test_select_option_should_select_single_option_by_empty_label(CODE
LOWtests/async/test_page_select_option.py156async def test_select_option_should_respect_event_bubbling(CODE
LOWtests/async/test_page_select_option.py165async def test_select_option_should_throw_when_element_is_not_a__select_(CODE
LOWtests/async/test_page_select_option.py174async def test_select_option_should_return_on_no_matched_values(CODE
LOWtests/async/test_page_select_option.py183async def test_select_option_should_return_an_array_of_matched_values(CODE
LOWtests/async/test_page_select_option.py192async def test_select_option_should_return_an_array_of_one_element_when_multiple_is_not_set(CODE
LOWtests/async/test_page_select_option.py200async def test_select_option_should_return_on_no_values(CODE
LOWtests/async/test_page_select_option.py208async def test_select_option_should_not_allow_null_items(CODE
LOWtests/async/test_page_select_option.py218async def test_select_option_should_unselect_with_null(CODE
LOWtests/async/test_page_select_option.py64async def test_select_option_should_select_single_option_by_handle(CODE
LOWtests/async/test_page_select_option.py75async def test_select_option_should_select_single_option_by_index(CODE
LOWtests/async/test_page_select_option.py92async def test_select_option_should_select_only_first_option(CODE
LOWtests/async/test_page_select_option.py101async def test_select_option_should_not_throw_when_select_causes_navigation(CODE
LOWtests/async/test_page_select_option.py114async def test_select_option_should_select_multiple_options(CODE
LOWtests/async/test_page_select_option.py124async def test_select_option_should_select_multiple_options_with_attributes(CODE
LOWtests/async/test_page_select_option.py139async def test_select_option_should_select_option_with_empty_value(CODE
LOWtests/async/test_page_select_option.py232async def test_select_option_should_deselect_all_options_when_passed_no_values_for_a_multiple_select(CODE
LOWtests/async/test_page_select_option.py245async def test_select_option_should_deselect_all_options_when_passed_no_values_for_a_select_without_multiple(CODE
LOWtests/async/test_page_select_option.py257async def test_select_option_should_work_when_re_defining_top_level_event_class(CODE
LOWtests/async/test_page_select_option.py267async def test_select_options_should_fall_back_to_selecting_by_label(CODE
LOWtests/async/test_fill.py25async def test_is_enabled_for_non_editable_button(page: Page) -> None:CODE
LOWtests/async/test_defaultbrowsercontext.py200async def test_should_support_viewport_option(CODE
LOWtests/async/test_defaultbrowsercontext.py210async def test_should_support_device_scale_factor_option(CODE
LOWtests/async/test_defaultbrowsercontext.py217async def test_should_support_user_agent_option(CODE
LOWtests/async/test_defaultbrowsercontext.py267async def test_should_support_offline_option(CODE
LOWtests/async/test_defaultbrowsercontext.py276async def test_should_support_has_touch_option(CODE
LOWtests/async/test_defaultbrowsercontext.py286async def test_should_work_in_persistent_context(CODE
LOWtests/async/test_defaultbrowsercontext.py311async def test_should_support_timezone_id_option(CODE
LOWtests/async/test_defaultbrowsercontext.py321async def test_should_support_contrast_option(CODE
LOWtests/async/test_defaultbrowsercontext.py331async def test_should_support_locale_option(CODE
LOWtests/async/test_defaultbrowsercontext.py338async def test_should_support_geolocation_and_permission_option(CODE
LOWtests/async/test_defaultbrowsercontext.py420async def test_should_have_default_url_when_launching_browser(CODE
LOWtests/async/test_defaultbrowsercontext.py429async def test_should_throw_if_page_argument_is_passed(CODE
LOWtests/async/test_defaultbrowsercontext.py438async def test_should_fire_close_event_for_a_persistent_context(CODE
LOWtests/async/test_defaultbrowsercontext.py448async def test_should_support_reduced_motion(CODE
LOWtests/async/test_defaultbrowsercontext.py455async def test_should_support_har_option(CODE
LOWtests/async/test_defaultbrowsercontext.py67async def test_context_cookies_should_work(CODE
LOWtests/async/test_defaultbrowsercontext.py96async def test_context_add_cookies_should_work(CODE
LOWtests/async/test_defaultbrowsercontext.py134async def test_context_clear_cookies_should_work(CODE
LOWtests/async/test_defaultbrowsercontext.py153async def test_should_not_block_third_party_cookies(CODE
LOWtests/async/test_defaultbrowsercontext.py230async def test_should_support_bypass_csp_option(CODE
LOWtests/async/test_defaultbrowsercontext.py240async def test_should_support_javascript_enabled_option(CODE
LOWtests/async/test_defaultbrowsercontext.py254async def test_should_support_http_credentials_option(CODE
LOWtests/async/test_defaultbrowsercontext.py298async def test_should_support_color_scheme_option(CODE
LOWtests/async/test_defaultbrowsercontext.py354async def test_should_support_ignore_https_errors_option(CODE
LOWtests/async/test_defaultbrowsercontext.py364async def test_should_support_extra_http_headers_option(CODE
LOWtests/async/test_defaultbrowsercontext.py376async def test_should_accept_user_data_dir(CODE
LOWtests/async/test_browsercontext_request_fallback.py57async def test_should_fall_back_async_delayed(CODE
LOWtests/async/test_browsercontext_request_fallback.py97async def test_should_fall_back_after_exception(CODE
LOWtests/async/test_browsercontext_request_fallback.py113async def test_should_amend_http_headers(CODE
LOWtests/async/test_browsercontext_request_fallback.py137async def test_should_delete_header_with_undefined_value(CODE
1977 more matches not shown…
Over-Commented Block254 hits · 240 pts
SeverityFileLineSnippetContext
LOWrequirements.txt1# This file was autogenerated by uv via the following command:COMMENT
LOWsetup.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/conftest.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/server.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/test_installation.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/utils.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/test_reference_count_async.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_page_select_option.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_fill.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_defaultbrowsercontext.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_browsercontext_request_fallback.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_add_init_script.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_jshandle.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_browsercontext_credentials.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_screenshot.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_resource_timing.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_extension.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/conftest.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_navigation.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_download.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_browsercontext_clearcookies.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_frames.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_input.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_request_fulfill.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_page_event_pageerror.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_pdf.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_browsercontext_proxy.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_selectors_get_by.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_tracing.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_selectors_text.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_console.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_browsercontext_route.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_element_handle.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_expect_misc.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_fetch_global.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_browsercontext_cookies.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_page_evaluate.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_browsercontext_client_certificates.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_geolocation.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_websocket.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_selector_generator.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_route_web_socket.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_emulation_focus.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_fetch_browser_context.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_browsercontext_storage_state.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_page.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_request_continue.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_cdp_session.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_video.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_locators.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_asyncio.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_focus.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_browsercontext_request_intercept.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_browsertype_connect_cdp.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_context_manager.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_ignore_https_errors.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_selectors_misc.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_wait_for_function.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_page_network_response.py1# Copyright (c) Microsoft Corporation.COMMENT
LOWtests/async/test_click.py1# Copyright (c) Microsoft Corporation.COMMENT
194 more matches not shown…
Cross-Language Confusion59 hits · 236 pts
SeverityFileLineSnippetContext
HIGHtests/async/test_jshandle.py129 undefined: undefined,STRING
HIGHtests/async/test_jshandle.py130 null: null,STRING
HIGHtests/async/test_navigation.py837 await page.evaluate("window.open('about:blank', null, 'noopener') && 1")CODE
HIGHtests/async/test_navigation.py862 "url => window.open(url, null, 'noopener') && 1", server.EMPTY_PAGECODE
HIGHtests/async/test_navigation.py202 window.addEventListener('beforeunload', () => history.replaceState(null, 'initial', window.location.href), falseSTRING
HIGHtests/async/test_input.py332 e.addEventListener('input', () => events.push('input'));STRING
HIGHtests/async/test_input.py333 e.addEventListener('change', () => events.push('change'));STRING
HIGHtests/async/test_console.py147 if (!frame.contentDocument || frame.contentDocument.readyState !== 'complete')STRING
HIGHtests/async/test_fetch_global.py466 ({"foo": None}, '{"foo": null}'),CODE
HIGHtests/async/test_page_evaluate.py179 '({ a, b }) => Object.is(a, null) && Object.is(b, "foo")',CODE
HIGHtests/async/test_route_web_socket.py53 window.ws.addEventListener('open', () => window.log.push('open'));STRING
HIGHtests/async/test_route_web_socket.py54 window.ws.addEventListener('close', event => window.log.push(`close code=${event.code} reason=${event.reason} wasCleSTRING
HIGHtests/async/test_route_web_socket.py55 window.ws.addEventListener('error', event => window.log.push(`error`));STRING
HIGHtests/async/test_route_web_socket.py64 window.log.push(`message: data=${data} origin=${event.origin} lastEventId=${event.lastEventId}`);STRING
HIGHtests/async/test_route_web_socket.py125 window.ws1.addEventListener('message', event => window.log.push(`ws1:${event.data}`));STRING
HIGHtests/async/test_route_web_socket.py127 window.ws2.addEventListener('message', event => window.log.push(`ws2:${event.data}`));STRING
HIGHtests/async/test_route_web_socket.py371 window.ws.addEventListener('message', event => window.log.push(event.data));STRING
HIGHtests/async/test_emulation_focus.py72 document.onclick = () => window.click_count = (window.click_count || 0) + 1;CODE
HIGHtests/async/test_emulation_focus.py119 element.onfocus = element.onblur = (e) => self._events.push(e.type);CODE
HIGHtests/async/test_page.py1370 events.push({STRING
HIGHtests/async/test_page.py1377 events.push({STRING
HIGHtests/async/test_page.py1384 events.push({STRING
HIGHtests/async/test_page.py1420 events.push({STRING
HIGHtests/async/test_page.py1427 events.push({STRING
HIGHtests/async/test_page.py1434 events.push({STRING
HIGHtests/async/test_page.py1327 events.push({STRING
HIGHtests/async/test_page.py1334 events.push({STRING
HIGHtests/async/test_locators.py1207 window.__dropInfo = null;CODE
HIGHtests/async/test_locators.py1215 files.push({ name: file.name, type: file.type, size: file.size, text: await file.text() });CODE
HIGHtests/async/test_locators.py759 events.push({CODE
HIGHtests/async/test_locators.py766 events.push({CODE
HIGHtests/async/test_click.py1130 window.result.push([event.clientX, event.clientY]);STRING
HIGHtests/async/test_page_route.py226 request.send(null);STRING
HIGHtests/async/test_keyboard.py123 document.addEventListener('keydown', e => events.push(e.type));STRING
HIGHtests/async/test_keyboard.py124 document.addEventListener('keyup', e => events.push(e.type));STRING
HIGHtests/async/test_keyboard.py125 document.addEventListener('keypress', e => events.push(e.type));STRING
HIGHtests/async/test_keyboard.py126 document.addEventListener('input', e => events.push(e.type));STRING
HIGHtests/async/test_keyboard.py40 lastEvent.keyIdentifier = 'keyIdentifier' in e && e.keyIdentifier;STRING
HIGHtests/async/test_keyboard.py485 if (event.key === 'a' && (event.metaKey || event.ctrlKey))STRING
HIGHtests/async/test_headful.py157 """() => window.outerWidth === 500 && window.outerHeight === 450"""STRING
HIGHtests/async/test_tap.py234 target.addEventListener(event, () => events.push(event), false);STRING
HIGHtests/async/test_browsertype_connect.py293 e.addEventListener('input', () => events.push('input'));STRING
HIGHtests/async/test_browsertype_connect.py294 e.addEventListener('change', () => events.push('change'));STRING
HIGHtests/async/test_popup.py379 '() => window.__popup = window.open(undefined, null, "noopener")'CODE
HIGHtests/async/test_popup.py394 '() => window.__popup = window.open("about:blank", null, "noopener")'CODE
HIGHtests/async/test_popup.py408 'url => window.__popup = window.open(url, null, "noopener")',CODE
HIGHtests/async/test_popup.py196 if (win.innerWidth === 600 && win.innerHeight === 300) {STRING
HIGHtests/sync/test_console.py152 if (!frame.contentDocument || frame.contentDocument.readyState !== 'complete')STRING
HIGHtests/sync/test_fetch_global.py333 assert response.text() == '{"foo": null}'CODE
HIGHtests/sync/test_route_web_socket.py50 window.ws.addEventListener('open', () => window.log.push('open'));STRING
HIGHtests/sync/test_route_web_socket.py51 window.ws.addEventListener('close', event => window.log.push(`close code=${event.code} reason=${event.reason} wasCleSTRING
HIGHtests/sync/test_route_web_socket.py52 window.ws.addEventListener('error', event => window.log.push(`error`));STRING
HIGHtests/sync/test_route_web_socket.py61 window.log.push(`message: data=${data} origin=${event.origin} lastEventId=${event.lastEventId}`);STRING
HIGHtests/sync/test_route_web_socket.py119 window.ws1.addEventListener('message', event => window.log.push(`ws1:${event.data}`));STRING
HIGHtests/sync/test_route_web_socket.py121 window.ws2.addEventListener('message', event => window.log.push(`ws2:${event.data}`));STRING
HIGHtests/sync/test_route_web_socket.py366 window.ws.addEventListener('message', event => window.log.push(event.data));STRING
HIGHtests/sync/test_locators.py1021 window.__dropInfo = null;CODE
HIGHtests/sync/test_locators.py1029 files.push({ name: file.name, type: file.type, size: file.size, text: await file.text() });CODE
HIGHtests/sync/test_tap.py110 target.addEventListener(event, () => events.push(event), false);STRING
Cross-File Repetition23 hits · 115 pts
SeverityFileLineSnippetContext
HIGHtests/async/test_defaultbrowsercontext.py0() => { document.cookie = 'username=john doe'; return document.cookie; }STRING
HIGHtests/async/test_browsercontext_cookies.py0() => { document.cookie = 'username=john doe'; return document.cookie; }STRING
HIGHtests/async/test_headful.py0() => { document.cookie = 'username=john doe'; return document.cookie; }STRING
HIGHtests/async/test_defaultbrowsercontext.py0src => { let fulfill; const promise = new promise(x => fulfill = x); const iframe = document.createelement('iframe'); doSTRING
HIGHtests/async/test_headful.py0src => { let fulfill; const promise = new promise(x => fulfill = x); const iframe = document.createelement('iframe'); doSTRING
HIGHtests/async/test_browsercontext_add_cookies.py0src => { let fulfill; const promise = new promise(x => fulfill = x); const iframe = document.createelement('iframe'); doSTRING
HIGHtests/async/test_browsercontext_request_fallback.py0async url => { const data = await fetch(url, { headers: { foo: 'a', bar: 'b', } }); return data.text(); }STRING
HIGHtests/async/test_page_request_fallback.py0async url => { const data = await fetch(url, { headers: { foo: 'a', bar: 'b', } }); return data.text(); }STRING
HIGHtests/sync/test_browsercontext_request_fallback.py0async url => { const data = await fetch(url, { headers: { foo: 'a', bar: 'b', } }); return data.text(); }STRING
HIGHtests/sync/test_page_request_fallback.py0async url => { const data = await fetch(url, { headers: { foo: 'a', bar: 'b', } }); return data.text(); }STRING
HIGHtests/async/test_element_handle.py0<button disabled>button1</button> <button>button2</button> <div>div</div>STRING
HIGHtests/async/test_locators.py0<button disabled>button1</button> <button>button2</button> <div>div</div>STRING
HIGHtests/sync/test_element_handle.py0<button disabled>button1</button> <button>button2</button> <div>div</div>STRING
HIGHtests/sync/test_locators.py0<button disabled>button1</button> <button>button2</button> <div>div</div>STRING
HIGHtests/async/test_click.py0<input type='radio'>one</input> <input id='two' type='radio'>two</input> <input type='radio'>three</input>STRING
HIGHtests/async/test_check.py0<input type='radio'>one</input> <input id='two' type='radio'>two</input> <input type='radio'>three</input>STRING
HIGHtests/sync/test_check.py0<input type='radio'>one</input> <input id='two' type='radio'>two</input> <input type='radio'>three</input>STRING
HIGHtests/async/test_click.py0<div role='checkbox' id='checkbox'>checkbox</div> <script> checkbox.addeventlistener('click', () => checkbox.setattributSTRING
HIGHtests/async/test_check.py0<div role='checkbox' id='checkbox'>checkbox</div> <script> checkbox.addeventlistener('click', () => checkbox.setattributSTRING
HIGHtests/sync/test_check.py0<div role='checkbox' id='checkbox'>checkbox</div> <script> checkbox.addeventlistener('click', () => checkbox.setattributSTRING
HIGHplaywright/__init__.py0python package `playwright` is a python library to automate chromium, firefox and webkit with a single api. playwright iSTRING
HIGHplaywright/async_api/__init__.py0python package `playwright` is a python library to automate chromium, firefox and webkit with a single api. playwright iSTRING
HIGHplaywright/sync_api/__init__.py0python package `playwright` is a python library to automate chromium, firefox and webkit with a single api. playwright iSTRING
Unused Imports113 hits · 100 pts
SeverityFileLineSnippetContext
LOWtests/async/conftest.py15CODE
LOWtests/async/test_navigation.py23CODE
LOWtests/async/test_download.py18CODE
LOWtests/async/test_browsercontext_proxy.py15CODE
LOWtests/async/test_browsercontext_proxy.py17CODE
LOWtests/async/test_browsercontext_proxy.py17CODE
LOWtests/async/test_browsercontext_proxy.py21CODE
LOWtests/async/test_browsercontext_route.py17CODE
LOWtests/async/test_browsercontext_route.py17CODE
LOWtests/async/test_fetch_browser_context.py19CODE
LOWtests/async/test_request_continue.py16CODE
LOWtests/async/test_worker.py20CODE
LOWtests/async/test_proxy.py15CODE
LOWtests/async/test_proxy.py17CODE
LOWtests/async/test_proxy.py21CODE
LOWplaywright/_impl/_credentials.py21CODE
LOWplaywright/_impl/_clock.py19CODE
LOWplaywright/_impl/_screencast.py27CODE
LOWplaywright/_impl/_helper.py55CODE
LOWplaywright/_impl/_helper.py56CODE
LOWplaywright/_impl/_helper.py56CODE
LOWplaywright/_impl/_helper.py56CODE
LOWplaywright/_impl/_helper.py56CODE
LOWplaywright/_impl/_locator.py59CODE
LOWplaywright/_impl/_locator.py60CODE
LOWplaywright/_impl/_locator.py61CODE
LOWplaywright/_impl/_fetch.py55CODE
LOWplaywright/_impl/_download.py22CODE
LOWplaywright/_impl/_console_message.py23CODE
LOWplaywright/_impl/_console_message.py24CODE
LOWplaywright/_impl/_browser_context.py88CODE
LOWplaywright/_impl/_page.py109CODE
LOWplaywright/_impl/_page.py110CODE
LOWplaywright/_impl/_page.py111CODE
LOWplaywright/_impl/_page.py111CODE
LOWplaywright/_impl/_video.py22CODE
LOWplaywright/_impl/_browser.py57CODE
LOWplaywright/_impl/_set_input_files_helpers.py36CODE
LOWplaywright/_impl/_network.py66CODE
LOWplaywright/_impl/_network.py68CODE
LOWplaywright/_impl/_network.py69CODE
LOWplaywright/_impl/_network.py69CODE
LOWplaywright/_impl/_browser_type.py51CODE
LOWplaywright/_impl/_har_router.py27CODE
LOWplaywright/_impl/_har_router.py28CODE
LOWplaywright/_impl/_har_router.py29CODE
LOWplaywright/_impl/_web_storage.py20CODE
LOWplaywright/_impl/_dialog.py22CODE
LOWplaywright/_impl/_frame.py33CODE
LOWplaywright/_impl/_file_chooser.py21CODE
LOWplaywright/_impl/_file_chooser.py22CODE
LOWplaywright/_impl/_js_handle.py30CODE
LOWplaywright/_impl/_async_base.py15CODE
LOWplaywright/_impl/_element_handle.py50CODE
LOWplaywright/_impl/_element_handle.py51CODE
LOWplaywright/_impl/_connection.py47CODE
LOWplaywright/_impl/_connection.py48CODE
LOWplaywright/async_api/_generated.py73CODE
LOWplaywright/async_api/_generated.py78CODE
LOWplaywright/async_api/__init__.py33CODE
53 more matches not shown…
AI Structural Patterns100 hits · 64 pts
SeverityFileLineSnippetContext
LOWplaywright/_impl/_locator.py953CODE
LOWplaywright/_impl/_locator.py149CODE
LOWplaywright/_impl/_locator.py165CODE
LOWplaywright/_impl/_locator.py271CODE
LOWplaywright/_impl/_locator.py563CODE
LOWplaywright/_impl/_locator.py835CODE
LOWplaywright/_impl/_fetch.py70CODE
LOWplaywright/_impl/_fetch.py130CODE
LOWplaywright/_impl/_fetch.py159CODE
LOWplaywright/_impl/_fetch.py188CODE
LOWplaywright/_impl/_fetch.py217CODE
LOWplaywright/_impl/_fetch.py246CODE
LOWplaywright/_impl/_fetch.py275CODE
LOWplaywright/_impl/_fetch.py304CODE
LOWplaywright/_impl/_fetch.py344CODE
LOWplaywright/_impl/_page.py795CODE
LOWplaywright/_impl/_page.py872CODE
LOWplaywright/_impl/_page.py888CODE
LOWplaywright/_impl/_page.py958CODE
LOWplaywright/_impl/_page.py1040CODE
LOWplaywright/_impl/_page.py1055CODE
LOWplaywright/_impl/_page.py1177CODE
LOWplaywright/_impl/_browser.py131CODE
LOWplaywright/_impl/_browser.py185CODE
LOWplaywright/_impl/_browser_type.py72CODE
LOWplaywright/_impl/_browser_type.py107CODE
LOWplaywright/_impl/_frame.py560CODE
LOWplaywright/_impl/_frame.py576CODE
LOWplaywright/_impl/_frame.py593CODE
LOWplaywright/_impl/_frame.py678CODE
LOWplaywright/_impl/_frame.py770CODE
LOWplaywright/_impl/_frame.py787CODE
LOWplaywright/_impl/_element_handle.py130CODE
LOWplaywright/_impl/_element_handle.py147CODE
LOWplaywright/_impl/_element_handle.py313CODE
LOWplaywright/async_api/_generated.py2270CODE
LOWplaywright/async_api/_generated.py2347CODE
LOWplaywright/async_api/_generated.py2992CODE
LOWplaywright/async_api/_generated.py4447CODE
LOWplaywright/async_api/_generated.py4531CODE
LOWplaywright/async_api/_generated.py4916CODE
LOWplaywright/async_api/_generated.py5535CODE
LOWplaywright/async_api/_generated.py5599CODE
LOWplaywright/async_api/_generated.py6415CODE
LOWplaywright/async_api/_generated.py10647CODE
LOWplaywright/async_api/_generated.py10833CODE
LOWplaywright/async_api/_generated.py10917CODE
LOWplaywright/async_api/_generated.py11299CODE
LOWplaywright/async_api/_generated.py11918CODE
LOWplaywright/async_api/_generated.py11998CODE
LOWplaywright/async_api/_generated.py12542CODE
LOWplaywright/async_api/_generated.py15766CODE
LOWplaywright/async_api/_generated.py16017CODE
LOWplaywright/async_api/_generated.py16426CODE
LOWplaywright/async_api/_generated.py16567CODE
LOWplaywright/async_api/_generated.py17607CODE
LOWplaywright/async_api/_generated.py17706CODE
LOWplaywright/async_api/_generated.py18268CODE
LOWplaywright/async_api/_generated.py19523CODE
LOWplaywright/async_api/_generated.py20540CODE
40 more matches not shown…
Excessive Try-Catch Wrapping46 hits · 56 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py220 except Exception:CODE
LOWtests/server.py299 except Exception:CODE
LOWtests/server.py332 except Exception:CODE
LOWtests/async/test_browsercontext_request_fallback.py105 except Exception:CODE
LOWtests/async/test_page_evaluate.py255 except Exception as e:CODE
LOWtests/async/test_request_continue.py109 except Exception as e:CODE
LOWtests/async/test_asyncio.py142 except Exception as error:CODE
LOWtests/async/test_page_request_fallback.py143 except Exception:CODE
LOWtests/sync/test_browsercontext_request_fallback.py151 except Exception:CODE
LOWtests/sync/conftest.py107 except Exception as e:CODE
MEDIUMtests/sync/conftest.py104def body() -> Any:CODE
LOWtests/sync/test_sync.py359 except Exception as error:CODE
LOWtests/sync/test_page_request_fallback.py141 except Exception:CODE
LOWtests/sync/test_page_add_locator_handler.py206 except Exception:CODE
LOWutils/linting/check_file_header.py59 except Exception as e:STRING
LOWplaywright/_impl/_helper.py264 except Exception:CODE
LOWplaywright/_impl/_helper.py431 except Exception as e:CODE
LOWplaywright/_impl/_helper.py459 except Exception as e:CODE
MEDIUMplaywright/_impl/_helper.py455def _handler() -> None:CODE
LOWplaywright/_impl/_transport.py131 except Exception as exc:CODE
LOWplaywright/_impl/_browser_context.py274 except Exception:CODE
MEDIUMplaywright/_impl/_page.py312def _update_interceptor_patterns_ignore_exceptions() -> None:CODE
LOWplaywright/_impl/_page.py864 except Exception as e:CODE
LOWplaywright/_impl/_page.py1436 except Exception as e:CODE
LOWplaywright/_impl/_page.py1609 except Exception as e:CODE
LOWplaywright/_impl/_waiter.py138 except Exception as e:CODE
LOWplaywright/_impl/_waiter.py146 except Exception as e:CODE
LOWplaywright/_impl/_waiter.py175 except Exception:CODE
LOWplaywright/_impl/_browser.py242 except Exception as e:CODE
LOWplaywright/_impl/_network.py228 except Exception:CODE
LOWplaywright/_impl/_network.py466 except Exception as e:CODE
LOWplaywright/_impl/_network.py574 except Exception:CODE
LOWplaywright/_impl/_network.py710 except Exception:CODE
LOWplaywright/_impl/_network.py761 except Exception:CODE
MEDIUMplaywright/_impl/_network.py571def _ignore_exception() -> None:CODE
LOWplaywright/_impl/_dialog.py60 except Exception as e:CODE
MEDIUMplaywright/_impl/_dialog.py54def dismiss(self) -> None:CODE
LOWplaywright/_impl/_js_handle.py119 except Exception as e:CODE
MEDIUMplaywright/_impl/_js_handle.py113def dispose(self) -> None:CODE
LOWplaywright/_impl/_disposable.py38 except Exception as e:CODE
MEDIUMplaywright/_impl/_disposable.py32def dispose(self) -> None:CODE
MEDIUMplaywright/_impl/_connection.py499 print("Error occurred in event listener", file=sys.stderr)CODE
LOWplaywright/_impl/_connection.py562 except Exception as error:CODE
LOWplaywright/_impl/_connection.py580 except Exception as error:CODE
LOWscripts/documentation_provider.py451 except Exception:CODE
LOWscripts/build_driver.py93 except Exception as error: # noqa: BLE001CODE
Modern Structural Boilerplate47 hits · 55 pts
SeverityFileLineSnippetContext
LOWtests/server.py247 def set_auth(self, path: str, username: str, password: str) -> None:CODE
LOWtests/server.py250 def set_csp(self, path: str, value: str) -> None:CODE
LOWtests/server.py269 def set_redirect(self, from_: str, to: str) -> None:CODE
LOWplaywright/_impl/_selectors.py59 def set_test_id_attribute(self, attributeName: str) -> None:CODE
LOWplaywright/_impl/_playwright.py56 def _set_selectors(self, selectors: Selectors) -> None:CODE
LOWplaywright/_impl/_helper.py311 def set_default_timeout(self, timeout: Optional[float]) -> None:CODE
LOWplaywright/_impl/_locator.py910def set_test_id_attribute_name(attribute_name: str) -> None:CODE
LOWplaywright/_impl/_browser_context.py297 def set_default_navigation_timeout(self, timeout: float) -> None:CODE
LOWplaywright/_impl/_browser_context.py300 def _set_default_navigation_timeout_impl(self, timeout: Optional[float]) -> None:CODE
LOWplaywright/_impl/_browser_context.py303 def set_default_timeout(self, timeout: float) -> None:CODE
LOWplaywright/_impl/_browser_context.py306 def _set_default_timeout_impl(self, timeout: Optional[float]) -> None:CODE
LOWplaywright/_impl/_browser_context.py395 async def set_geolocation(self, geolocation: Geolocation = None) -> None:CODE
LOWplaywright/_impl/_browser_context.py398 async def set_extra_http_headers(self, headers: Dict[str, str]) -> None:CODE
LOWplaywright/_impl/_browser_context.py403 async def set_offline(self, offline: bool) -> None:CODE
LOWplaywright/_impl/_browser_context.py519 async def _update_interception_patterns(self) -> None:CODE
LOWplaywright/_impl/_browser_context.py525 async def _update_web_socket_interception_patterns(self) -> None:CODE
LOWplaywright/_impl/_page.py404 def set_default_navigation_timeout(self, timeout: float) -> None:CODE
LOWplaywright/_impl/_page.py407 def set_default_timeout(self, timeout: float) -> None:CODE
LOWplaywright/_impl/_page.py777 async def _update_interception_patterns(self) -> None:CODE
LOWplaywright/_impl/_page.py785 async def _update_web_socket_interception_patterns(self) -> None:CODE
LOWplaywright/_impl/_page.py312 async def _update_interceptor_patterns_ignore_exceptions() -> None:CODE
LOWplaywright/_impl/_page.py531 async def set_extra_http_headers(self, headers: Dict[str, str]) -> None:CODE
LOWplaywright/_impl/_page.py655 async def set_viewport_size(self, viewportSize: ViewportSize) -> None:CODE
LOWplaywright/_impl/_browser.py110 def _setup_browser_context(self, context: BrowserContext) -> None:CODE
LOWplaywright/_impl/_network.py287 def _set_response_end_timing(self, response_end_timing: float) -> None:CODE
LOWplaywright/_impl/_web_storage.py45 async def set_item(self, name: str, value: str) -> None:CODE
LOWplaywright/_impl/_connection.py194 def _set_event_to_subscription_mapping(self, mapping: Dict[str, str]) -> None:CODE
LOWplaywright/_impl/_connection.py197 def _update_subscription(self, event: str, enabled: bool) -> None:CODE
LOWplaywright/_impl/_connection.py348 def set_is_tracing(self, is_tracing: bool) -> None:CODE
LOWplaywright/async_api/_generated.py7090 def set_test_id_attribute(self, attribute_name: str) -> None:CODE
LOWplaywright/async_api/_generated.py9633 async def set_extra_http_headers(self, headers: typing.Dict[str, str]) -> None:CODE
LOWplaywright/async_api/_generated.py10316 async def set_viewport_size(self, viewport_size: ViewportSize) -> None:CODE
LOWplaywright/async_api/_generated.py13676 async def set_item(self, name: str, value: str) -> None:CODE
LOWplaywright/async_api/_generated.py14530 async def set_extra_http_headers(self, headers: typing.Dict[str, str]) -> None:CODE
LOWplaywright/async_api/_generated.py14552 async def set_offline(self, offline: bool) -> None:CODE
LOWplaywright/async_api/__init__.py106 def set_options(self, timeout: Optional[float] = _unset) -> None:CODE
LOWplaywright/async_api/__init__.py206__all__ = [CODE
LOWplaywright/sync_api/_generated.py7180 def set_test_id_attribute(self, attribute_name: str) -> None:CODE
LOWplaywright/sync_api/_generated.py7323 def set_fixed_time(self, time: typing.Union[float, str, datetime.datetime]) -> None:CODE
LOWplaywright/sync_api/_generated.py9637 def set_extra_http_headers(self, headers: typing.Dict[str, str]) -> None:CODE
LOWplaywright/sync_api/_generated.py10338 def set_viewport_size(self, viewport_size: ViewportSize) -> None:CODE
LOWplaywright/sync_api/_generated.py13758 def set_item(self, name: str, value: str) -> None:CODE
LOWplaywright/sync_api/_generated.py14503 def set_geolocation(self, geolocation: typing.Optional[Geolocation] = None) -> None:CODE
LOWplaywright/sync_api/_generated.py14526 def set_extra_http_headers(self, headers: typing.Dict[str, str]) -> None:CODE
LOWplaywright/sync_api/_generated.py14548 def set_offline(self, offline: bool) -> None:CODE
LOWplaywright/sync_api/__init__.py106 def set_options(self, timeout: Optional[float] = _unset) -> None:CODE
LOWplaywright/sync_api/__init__.py206__all__ = [CODE
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALplaywright/_impl/_browser_context.py562 self._browser._browser_type._playwright.selectors._contexts_for_selectors.remove(CODE
CRITICALplaywright/_impl/_browser.py113 self._browser_type._playwright.selectors._contexts_for_selectors.add(context)CODE
Fake / Example Data19 hits · 18 pts
SeverityFileLineSnippetContext
LOWtests/async/test_defaultbrowsercontext.py193 "value": "John Doe",CODE
LOWtests/async/test_defaultbrowsercontext.py85 "value": "John Doe",CODE
LOWtests/async/test_defaultbrowsercontext.py108 "value": "John Doe",CODE
LOWtests/async/test_defaultbrowsercontext.py117 "value": "John Doe",CODE
LOWtests/async/test_selectors_get_by.py29 input.setAttribute('placeholder', 'hello my\\nwo"rld');STRING
LOWtests/async/test_selectors_get_by.py59 input.setAttribute('placeholder', 'hello my\\nworld');STRING
LOWtests/async/test_selectors_get_by.py98 input.setAttribute('placeholder', 'foo >> bar');STRING
LOWtests/async/test_browsercontext_cookies.py46 "value": "John Doe",CODE
LOWtests/async/test_browsercontext_cookies.py89 "value": "John Doe",CODE
LOWtests/async/test_browsercontext_cookies.py184 "value": "John Doe",CODE
LOWtests/async/test_fetch_browser_context.py79 "value": "John Doe",CODE
LOWtests/async/test_fetch_browser_context.py186 "value": "John Doe",CODE
LOWtests/async/test_headful.py129 "value": "John Doe",CODE
LOWtests/async/test_browsercontext_add_cookies.py432 "value": "John Doe",CODE
LOWtests/sync/test_fetch_browser_context.py74 "value": "John Doe",CODE
LOWtests/sync/test_fetch_browser_context.py172 "value": "John Doe",CODE
LOWtests/sync/test_locator_get_by.py161 input.setAttribute('placeholder', 'hello my\\nwo"rld');STRING
LOWtests/sync/test_locator_get_by.py183 input.setAttribute('placeholder', 'hello my\\nworld');STRING
LOWplaywright/_impl/_locator.py942 return get_by_attribute_text_selector("placeholder", text, exact=exact)CODE
Deep Nesting19 hits · 17 pts
SeverityFileLineSnippetContext
LOWtests/async/test_navigation.py1111CODE
LOWtests/async/test_network.py683CODE
LOWtests/common/test_events.py22CODE
LOWplaywright/_impl/_glob.py19CODE
LOWplaywright/_impl/_fetch.py344CODE
LOWplaywright/_impl/_transport.py137CODE
LOWplaywright/_impl/_page.py294CODE
LOWplaywright/_impl/_page.py1422CODE
LOWplaywright/_impl/_js_handle.py213CODE
LOWplaywright/_impl/_connection.py408CODE
LOWscripts/generate_async_api.py38CODE
LOWscripts/generate_api.py157CODE
LOWscripts/documentation_provider.py52CODE
LOWscripts/documentation_provider.py116CODE
LOWscripts/documentation_provider.py212CODE
LOWscripts/documentation_provider.py304CODE
LOWscripts/documentation_provider.py336CODE
LOWscripts/build_driver.py84CODE
LOWscripts/generate_sync_api.py42CODE
Overly Generic Function Names16 hits · 14 pts
SeverityFileLineSnippetContext
LOWtests/async/test_navigation.py901 def handle_request(request: TestServerRequest) -> None:CODE
LOWtests/async/test_network.py39 async def handle_request(route: Route, request: Request) -> None:CODE
LOWtests/async/test_network.py73 async def handle_request(CODE
LOWtests/async/test_network.py691 def handle_request(request: TestServerRequest) -> None:CODE
LOWtests/async/test_network.py795 def handle_request(request: Request) -> None:CODE
LOWtests/async/test_page_route.py42 async def handle_request(route: Route, request: Request) -> None:CODE
LOWtests/async/test_page_route.py141 async def handle_request(route: Route) -> None:CODE
LOWtests/async/test_page_route.py260 def handle_request(request: Request) -> None:CODE
LOWtests/async/test_page_route.py418 def handle_request(request: TestServerRequest, hits: List[bool]) -> None:CODE
LOWtests/async/test_page_route.py1001 async def handle_request(route: Route) -> None:CODE
LOWtests/async/test_page_route.py1040 async def handle_request(route: Route) -> None:CODE
LOWtests/async/test_browsertype_connect.py254 async def handle_request(route: Route) -> None:CODE
LOWtests/async/test_popup.py57 async def handle_request(route: Route) -> None:CODE
LOWtests/async/test_popup.py222 def handle_request(route: Route, request: Request, intercepted: List[bool]) -> None:CODE
LOWtests/sync/test_network.py81 def handle_request(route: Route) -> None:CODE
LOWtests/sync/test_browsertype_connect.py213 def handle_request(route: Route) -> None:CODE
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMtests/async/test_browsercontext.py71 # Create a page in first incognito context.COMMENT
MEDIUMtests/async/test_browsercontext.py84 # Create a page in second incognito context.COMMENT
MEDIUMplaywright/sync_api/_context_manager.py52 # Create a new fiber for the protocol dispatcher. It will be pumping eventsCOMMENT
Slop Phrases2 hits · 2 pts
SeverityFileLineSnippetContext
MEDIUMplaywright/async_api/_generated.py18807 possibly throwing the [\"strict mode violation\" error](https://playwright.dev/python/docs/locators#strictness).STRING
MEDIUMplaywright/sync_api/_generated.py18804 possibly throwing the [\"strict mode violation\" error](https://playwright.dev/python/docs/locators#strictness).STRING