AI Slop Code RIsk Monitor

beeware/toga

A Python native, OS native GUI toolkit.

22.7 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for beeware/toga, a Python project with 5,415 GitHub stars. SynthScan examined 161,836 lines of code across 1468 source files, recording 2312 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 22.7 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

22.7
Adjusted Signal
22.7
Raw Pattern Score
100%
Time Factor
2026-10-07
Last Push
5.4K
Stars
Python
Language
161.8K
Lines of Code
1.5K
Files
2.3K
Pattern Hits
2026-10-12
Scan Date
0.12
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 39.5/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 1276 finding(s).

Hallucinated Dependency & Supply Chain Risk 31.5/100 · MEDIUM

Are imports declared and package/API names verified? 790 finding(s).

Agent Over-Engineering Ratio 42.2/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 1169 finding(s).

PR Review Velocity Impact 68.3/100 · HIGH

Which changes need focused human review? 2312 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 41HIGH 139MEDIUM 174LOW 1958

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 2312 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers912 hits · 933 pts
SeverityFileLineSnippetContext
LOWdummy/src/toga_dummy/utils.py275def assert_attribute_retrieved(_widget, _attr):CODE
LOWdummy/src/toga_dummy/utils.py288def assert_attribute_not_retrieved(_widget, _attr):CODE
LOWdummy/src/toga_dummy/utils.py316def assert_action_not_performed(_widget, _action):CODE
LOWdummy/src/toga_dummy/utils.py343def assert_action_performed_with(_widget, _action, **test_data):CODE
LOWdummy/src/toga_dummy/fonts.py11 def load_predefined_system_font(self):CODE
LOWdummy/src/toga_dummy/fonts.py23 def load_user_registered_font(self):CODE
LOWdummy/src/toga_dummy/fonts.py27 def load_arbitrary_system_font(self):CODE
LOWdummy/src/toga_dummy/hardware/location.py31 def has_background_permission(self):CODE
LOWdummy/src/toga_dummy/hardware/location.py40 def request_background_permission(self, future):CODE
LOWdummy/src/toga_dummy/widgets/detailedlist.py82 def set_primary_action_enabled(self, enabled):CODE
LOWdummy/src/toga_dummy/widgets/detailedlist.py85 def set_secondary_action_enabled(self, enabled):CODE
LOWdummy/src/toga_dummy/widgets/scrollcontainer.py56 def get_max_horizontal_position(self):CODE
LOWdummy/src/toga_dummy/widgets/scrollcontainer.py62 def get_max_vertical_position(self):CODE
LOW⚡dummy/src/toga_dummy/widgets/webview.py58 def simulate_javascript_result(self, value):CODE
LOW⚡dummy/src/toga_dummy/widgets/webview.py61 def simulate_cookie_retrieval(self, cookies):CODE
LOW⚡dummy/src/toga_dummy/widgets/webview.py68 def simulate_navigation_starting(self, url):CODE
LOWcore/tests/test_images.py54def test_create_from_bad_file(app):CODE
LOWcore/tests/test_images.py93def test_create_with_nonexistent_file(app, args, kwargs):CODE
LOWcore/tests/test_images.py127def test_create_from_bad_bytes():CODE
LOWcore/tests/test_images.py165def test_empty_image_explicit():CODE
LOWcore/tests/test_images.py174def test_invalid_input_format():CODE
LOWcore/tests/test_images.py193def test_create_from_toga_image(app):CODE
LOWcore/tests/test_images.py203def test_deprecated_arguments(kwargs):CODE
LOW⚡core/tests/test_images.py294def test_create_from_custom_class(app, ImageClass):CODE
LOW⚡core/tests/test_images.py303def test_as_format_custom_class(app, ImageClass):CODE
LOW⚡core/tests/test_images.py311def test_disabled_image_plugin(app):CODE
LOW⚡core/tests/test_images.py318def test_as_format_invalid_input(app, arg):CODE
LOWcore/tests/test_handlers.py32def test_noop_handler_with_cleanup():CODE
LOWcore/tests/test_handlers.py48def test_noop_handler_with_cleanup_error(capsys):CODE
LOWcore/tests/test_handlers.py95def test_function_handler_error(capsys):CODE
LOWcore/tests/test_handlers.py125def test_function_handler_with_cleanup():CODE
LOWcore/tests/test_handlers.py154def test_function_handler_with_cleanup_error(capsys):CODE
LOWcore/tests/test_handlers.py229async def test_generator_handler_error(capsys):CODE
LOWcore/tests/test_handlers.py266async def test_generator_handler_with_cleanup():CODE
LOWcore/tests/test_handlers.py305async def test_generator_handler_with_cleanup_error(capsys):CODE
LOWcore/tests/test_handlers.py381async def test_coroutine_handler_error(capsys):CODE
LOWcore/tests/test_handlers.py413async def test_coroutine_handler_with_cleanup():CODE
LOWcore/tests/test_handlers.py445async def test_coroutine_handler_with_cleanup_error(capsys):CODE
LOWcore/tests/test_handlers.py496async def test_async_result_non_comparable():CODE
LOWcore/tests/test_handlers.py563async def test_async_result_cancelled():CODE
LOWcore/tests/test_handlers.py588async def test_async_exception_cancelled():CODE
LOWcore/tests/test_handlers.py602def test_simple_handler_function():CODE
LOWcore/tests/test_handlers.py625async def test_simple_handler_coroutine():CODE
LOWcore/tests/test_handlers.py673async def test_async_result_cancelled_sync():CODE
LOWcore/tests/test_handlers.py696async def test_async_exception_sync():CODE
LOWcore/tests/test_handlers.py718async def test_async_exception_cancelled_sync():CODE
LOWcore/tests/test_handlers.py741def test_weakref_function_call():CODE
LOWcore/tests/test_handlers.py834def test_weakref_callable_object():CODE
LOWcore/tests/test_handlers.py848def test_weakref_none_result_when_function_gone():CODE
LOWcore/tests/test_fonts.py191def test_register_shadowed_font(app, family):CODE
LOWcore/tests/test_fonts.py216def test_register_font_variant(app, path, registered):CODE
LOWcore/tests/test_paths.py64def test_simple_as_file_in_module(tmp_path):CODE
LOWcore/tests/test_paths.py106def test_simple_as_deep_module(tmp_path):CODE
LOW⚡core/tests/test_paths.py120def test_subclassed_as_file_in_module(tmp_path):CODE
LOW⚡core/tests/test_paths.py129def test_subclassed_as_module(tmp_path):CODE
LOW⚡core/tests/test_paths.py138def test_subclassed_as_deep_file(tmp_path):CODE
LOWcore/tests/test_paths.py149def test_subclassed_as_deep_module(tmp_path):CODE
LOWcore/tests/test_paths.py191def test_user_dir_doesnt_exist(app, name, tmp_path):CODE
LOWcore/tests/test_paths.py204def test_user_dir_default_location(app, name, monkeypatch):CODE
LOWcore/tests/test_paths.py253def test_platformdirs_app_paths(platformdirs_app, name, tmp_path):CODE
852 more matches not shown…
Unused Imports711 hits · 627 pts
SeverityFileLineSnippetContext
LOWdummy/src/toga_dummy/factory.py3CODE
LOWdummy/src/toga_dummy/factory.py4CODE
LOWdummy/src/toga_dummy/factory.py4CODE
LOWdummy/src/toga_dummy/factory.py5CODE
LOWdummy/src/toga_dummy/factory.py6CODE
LOWdummy/src/toga_dummy/factory.py7CODE
LOWdummy/src/toga_dummy/factory.py8CODE
LOWdummy/src/toga_dummy/factory.py9CODE
LOWdummy/src/toga_dummy/factory.py10CODE
LOWdummy/src/toga_dummy/factory.py11CODE
LOWdummy/src/toga_dummy/factory.py12CODE
LOWdummy/src/toga_dummy/factory.py12CODE
LOWdummy/src/toga_dummy/factory.py12CODE
LOWdummy/src/toga_dummy/factory.py13CODE
LOWdummy/src/toga_dummy/factory.py14CODE
LOWdummy/src/toga_dummy/factory.py15CODE
LOWdummy/src/toga_dummy/factory.py16CODE
LOWdummy/src/toga_dummy/factory.py17CODE
LOWdummy/src/toga_dummy/factory.py18CODE
LOWdummy/src/toga_dummy/factory.py19CODE
LOWdummy/src/toga_dummy/factory.py20CODE
LOWdummy/src/toga_dummy/factory.py21CODE
LOWdummy/src/toga_dummy/factory.py22CODE
LOWdummy/src/toga_dummy/factory.py23CODE
LOWdummy/src/toga_dummy/factory.py24CODE
LOWdummy/src/toga_dummy/factory.py25CODE
LOWdummy/src/toga_dummy/factory.py26CODE
LOWdummy/src/toga_dummy/factory.py27CODE
LOWdummy/src/toga_dummy/factory.py28CODE
LOWdummy/src/toga_dummy/factory.py29CODE
LOWdummy/src/toga_dummy/factory.py30CODE
LOWdummy/src/toga_dummy/factory.py31CODE
LOWdummy/src/toga_dummy/factory.py32CODE
LOWdummy/src/toga_dummy/factory.py33CODE
LOWdummy/src/toga_dummy/factory.py34CODE
LOWdummy/src/toga_dummy/factory.py35CODE
LOWdummy/src/toga_dummy/factory.py36CODE
LOWdummy/src/toga_dummy/factory.py37CODE
LOWdummy/src/toga_dummy/factory.py38CODE
LOWdummy/src/toga_dummy/factory.py39CODE
LOWdummy/src/toga_dummy/factory.py39CODE
LOWdummy/src/toga_dummy/images.py1CODE
LOWdummy/src/toga_dummy/hardware/location.py1CODE
LOWdummy/src/toga_dummy/plugins/image_formats.py1CODE
LOWcore/tests/sources/test_source.py116CODE
LOWcore/tests/sources/test_source.py134CODE
LOWcore/tests/widgets/canvas/test_deprecations.py65CODE
LOWcore/src/toga/command.py1CODE
LOWcore/src/toga/window.py1CODE
LOWcore/src/toga/icons.py1CODE
LOWcore/src/toga/validators.py1CODE
LOWcore/src/toga/documents.py1CODE
LOWcore/src/toga/handlers.py1CODE
LOWcore/src/toga/keys.py1CODE
LOWcore/src/toga/types.py1CODE
LOWcore/src/toga/platform.py1CODE
LOWcore/src/toga/images.py1CODE
LOWcore/src/toga/app.py1CODE
LOWcore/src/toga/statusicons.py1CODE
LOWcore/src/toga/dialogs.py1CODE
651 more matches not shown…
Hallucination Indicators41 hits · 510 pts
SeverityFileLineSnippetContext
CRITICALweb/src/toga_web/dialogs.py12 toga.App.app._impl.native.appendChild(self.native)CODE
CRITICALtextual/tests_backend/probe.py94 self.app._impl.native.screen._on_timer_update()CODE
CRITICALtextual/tests_backend/app.py32 return toga.App.app._impl.native._context()CODE
CRITICALtextual/src/toga_textual/dialogs.py63 toga.App.app._impl.native.push_screen(self.native, self.on_close)CODE
CRITICAL⚡iOS/tests_backend/hardware/location.py59 self.app.location._impl.delegate.locationManagerDidChangeAuthorization(None)CODE
CRITICAL⚡iOS/tests_backend/hardware/location.py68 self.app.location._impl.delegate.locationManagerDidChangeAuthorization(None)CODE
CRITICAL⚡iOS/tests_backend/hardware/location.py138 self.app.location._impl.native.requestLocation.assert_not_called()CODE
CRITICAL⚡iOS/tests_backend/hardware/location.py141 self.app.location._impl.native.requestLocation.assert_called_once_with()CODE
CRITICAL⚡iOS/tests_backend/hardware/location.py142 self.app.location._impl.native.requestLocation.reset_mock()CODE
CRITICAL⚡iOS/tests_backend/hardware/location.py145 self.app.location._impl.delegate.locationManager(CODE
CRITICAL⚡iOS/tests_backend/hardware/location.py159 self.app.location._impl.delegate.locationManager(CODE
CRITICAL⚡iOS/tests_backend/hardware/location.py167 self.app.location._impl.native.requestLocation.assert_called_once_with()CODE
CRITICAL⚡iOS/tests_backend/hardware/location.py168 self.app.location._impl.native.requestLocation.reset_mock()CODE
CRITICAL⚡iOS/tests_backend/hardware/location.py171 self.app.location._impl.delegate.locationManager(CODE
CRITICALiOS/tests_backend/widgets/webview.py20 current = self.widget.window._impl.native.firstResponder()CODE
CRITICALiOS/tests_backend/widgets/base.py74 self.widget.window.content._impl.native.layer.displayIfNeeded()CODE
CRITICALcocoa/tests_backend/app.py332 self.app._impl.native.delegate.application(CODE
CRITICAL⚡cocoa/tests_backend/hardware/location.py59 self.app.location._impl.delegate.locationManagerDidChangeAuthorization(None)CODE
CRITICAL⚡cocoa/tests_backend/hardware/location.py68 self.app.location._impl.delegate.locationManagerDidChangeAuthorization(None)CODE
CRITICAL⚡cocoa/tests_backend/hardware/location.py138 self.app.location._impl.native.requestLocation.assert_not_called()CODE
CRITICAL⚡cocoa/tests_backend/hardware/location.py141 self.app.location._impl.native.requestLocation.assert_called_once_with()CODE
CRITICAL⚡cocoa/tests_backend/hardware/location.py142 self.app.location._impl.native.requestLocation.reset_mock()CODE
CRITICAL⚡cocoa/tests_backend/hardware/location.py145 self.app.location._impl.delegate.locationManager(CODE
CRITICAL⚡cocoa/tests_backend/hardware/location.py159 self.app.location._impl.delegate.locationManager(CODE
CRITICAL⚡cocoa/tests_backend/hardware/location.py167 self.app.location._impl.native.requestLocation.assert_called_once_with()CODE
CRITICAL⚡cocoa/tests_backend/hardware/location.py168 self.app.location._impl.native.requestLocation.reset_mock()CODE
CRITICAL⚡cocoa/tests_backend/hardware/location.py171 self.app.location._impl.delegate.locationManager(CODE
CRITICALcocoa/tests_backend/widgets/base.py49 self.widget.window.content._impl.native.displayIfNeeded()CODE
CRITICALcocoa/src/toga_cocoa/window.py377 and not self.interface.app._impl.native.isHidden()CODE
CRITICALcocoa/src/toga_cocoa/hardware/camera.py180 self.camera.interface.app.loop.create_task(CODE
CRITICALcocoa/src/toga_cocoa/widgets/numberinput.py203 self.interface.window._impl.native.makeFirstResponder(self.native_input)CODE
CRITICALcocoa/src/toga_cocoa/widgets/base.py90 self.interface.window._impl.native.makeFirstResponder(self.native)CODE
CRITICALandroid/tests_backend/hardware/location.py96 self.app.location._impl.listener.onLocationChanged(locations)CODE
CRITICALandroid/tests_backend/widgets/base.py187 return self.widget.app._impl.native.getCurrentFocus() == self.nativeCODE
CRITICALandroid/src/toga_android/hardware/location.py61 self.context = self.interface.app._impl.native.getApplicationContext()CODE
CRITICALandroid/src/toga_android/hardware/camera.py45 self.context = self.interface.app._impl.native.getApplicationContext()CODE
CRITICALandroid/src/toga_android/hardware/camera.py77 manager = self.interface.app._impl.native.getSystemService(CODE
CRITICALwinforms/tests_backend/widgets/tree.py126 window_hwnd = HWND(int(self.widget.window._impl.native.Handle.ToString()))CODE
CRITICALwinforms/tests_backend/widgets/detailedlist.py216 window_hwnd = HWND(int(self.widget.window._impl.native.Handle.ToString()))CODE
CRITICALgtk/tests_backend/widgets/base.py195 event.window = self.widget.window._impl.native.get_window()CODE
CRITICALgtk/src/toga_gtk/widgets/imageview.py56 scaled = self.interface.image._impl.native.scale_simple(CODE
Self-Referential Comments134 hits · 412 pts
SeverityFileLineSnippetContext
MEDIUMdemo/toga_demo/app.py10 # Create the main windowCOMMENT
MEDIUMcore/tests/utils.py4# Create the simplest possible widget with a concrete implementation that willCOMMENT
MEDIUMcore/tests/utils.py19# Create the simplest possible widget with a concrete implementation that cannotCOMMENT
MEDIUMcore/tests/app/test_document_app.py86 # Create an instance of an ExampleDocumentApp that has 1 file open.COMMENT
MEDIUMcore/tests/app/test_document_app.py198 # Create the app instanceCOMMENT
MEDIUMcore/tests/app/test_document_app.py424 # Create a second document windowCOMMENT
MEDIUMcore/tests/app/test_document_app.py464 # Create a second document windowCOMMENT
MEDIUMcore/tests/app/test_simpleapp.py48 # Create a non-closable main windowCOMMENT
MEDIUM⚡core/tests/app/test_app.py483 # Creating an app with an invalid main window raises an exception.COMMENT
MEDIUMcore/tests/app/test_app.py967 # Create a second, non-main windowCOMMENT
MEDIUMcore/tests/app/test_app.py1056 # Create an async task that we can use to start the event loop for a short time.COMMENT
MEDIUMcore/tests/window/test_window.py990 # Creating a new widget with same widget ID should not raise KeyErrorCOMMENT
MEDIUMcore/tests/window/test_filtered_widget_registry.py8# Create a box subclass with a reproducible reprCOMMENT
MEDIUMcore/tests/window/test_filtered_widget_registry.py148 # Create a widget with the magic ID. The widget still isn't in the registry, becauseCOMMENT
MEDIUMcore/tests/window/test_filtered_widget_registry.py164 # Create a second widget with the same ID.COMMENT
MEDIUMcore/tests/statusicons/test_statusiconset.py36 # Create the standard commands on the StatusIconSetCOMMENT
MEDIUMcore/tests/command/test_commandset.py39 # Create a standalone command set and add some commandsCOMMENT
MEDIUMcore/tests/command/test_commandset.py83 # Create a command set that is linked to the app and add some commandsCOMMENT
MEDIUMcore/tests/command/test_commandset.py149 # Define a command with an IDCOMMENT
MEDIUMcore/tests/command/test_commandset.py169 # Define a command with an IDCOMMENT
MEDIUMcore/tests/command/test_commandset.py295 # Define a third command that isn't added.COMMENT
MEDIUMcore/tests/command/test_commandset.py341 # Define a third command that isn't added.COMMENT
MEDIUMcore/tests/widgets/test_selection.py244 # Create a selection with an extra item and an explicit accessorCOMMENT
MEDIUMcore/tests/widgets/test_mapview.py76 # Create a LatLng object.COMMENT
MEDIUMcore/tests/widgets/test_textinput.py129 # Define a validator that only accepts numbersCOMMENT
MEDIUMcore/tests/widgets/test_progressbar.py229 # Creating a new progress bar with running=True so it is already runningCOMMENT
MEDIUM⚡core/tests/widgets/test_base.py79 # Create a child widgetCOMMENT
MEDIUM⚡core/tests/widgets/test_base.py96 # Create a child widgetCOMMENT
MEDIUM⚡core/tests/widgets/test_base.py368 # Create a child widgetCOMMENT
MEDIUM⚡core/tests/widgets/test_base.py385 # Create a child widgetCOMMENT
MEDIUMcore/tests/widgets/test_base.py136 # Create a child widgetCOMMENT
MEDIUMcore/tests/widgets/test_base.py301 # Create a second parent widget, and add a child to itCOMMENT
MEDIUMcore/tests/widgets/test_base.py421 # Create a child widgetCOMMENT
MEDIUMcore/tests/widgets/test_base.py551 # Create a child widgetCOMMENT
MEDIUMcore/tests/widgets/test_base.py596 # Create a second parent widget, and add a child to itCOMMENT
MEDIUMcore/tests/widgets/test_base.py663 # Create a child widgetCOMMENT
MEDIUMcore/tests/widgets/test_base.py915 # Create a second parent widget, and add a child to itCOMMENT
MEDIUMcore/tests/widgets/test_base.py1052 # Create a new appCOMMENT
MEDIUMcore/tests/widgets/test_base.py1133 # Create a new windowCOMMENT
MEDIUMcore/tests/widgets/test_activityindicator.py124 # Creating a new progress bar with running=True so it is already runningCOMMENT
MEDIUMcore/tests/widgets/canvas/test_deprecations.py137 # Create a sub-state to ensure the method appends to root, not the active state.COMMENT
MEDIUMcore/tests/widgets/canvas/test_deprecations.py175 # Create a sub-state to ensure the method appends to root, not the active state.COMMENT
MEDIUMcore/src/toga/window.py979 # Create a toolbar that is linked to the app.COMMENT
MEDIUMcore/src/toga/documents.py41 # Create the visual representation of the document.COMMENT
MEDIUMcore/src/toga/images.py29 # Define the types that can be used as Image contentCOMMENT
MEDIUMcore/src/toga/app.py458 # Create the implementation. This will trigger any startup logic.COMMENT
MEDIUMcore/src/toga/statusicons.py165 # Create the standard commands for the menu status icon. Use the standardCOMMENT
MEDIUMcore/src/toga/widgets/optioncontainer.py380 # Create an interface wrapper for the option.COMMENT
MEDIUMtestbed/tests/testbed.py222 # Create the test app, starting the test suite as a background taskCOMMENT
MEDIUMtestbed/tests/test_icons.py26 # Create a second icon using an alternate (non-preferred) resource format.COMMENT
MEDIUMtestbed/tests/test_statusicons.py40 # Create a new menu status itemCOMMENT
MEDIUMtestbed/tests/test_statusicons.py108 # Create a new menu status itemCOMMENT
MEDIUMtestbed/tests/app/test_document_app.py26 # Create a new documentCOMMENT
MEDIUMtestbed/src/testbed/app.py13 # Create the main window for the document.COMMENT
MEDIUMtestbed/src/testbed/app.py35 # Create the main window for the document.COMMENT
MEDIUMtestbed/src/testbed/app.py177 # Create a submenu on the first status menu;COMMENT
MEDIUMweb/src/toga_web/app.py110 # Create a button handler to capture the close,COMMENT
MEDIUMqt/src/toga_qt/fonts.py101 # Create the font query.COMMENT
MEDIUMqt/src/toga_qt/widgets/tree.py228 # Create the List widgetCOMMENT
MEDIUMqt/src/toga_qt/widgets/detailedlist.py340 # This method is no-covered as it is purely cosmeticCOMMENT
74 more matches not shown…
Cross-File Repetition67 hits · 335 pts
SeverityFileLineSnippetContext
HIGHcore/tests/app/test_dialogs.py0if no path is provided, a open file dialog will use the default directory.STRING
HIGHcore/tests/window/test_window.py0if no path is provided, a open file dialog will use the default directory.STRING
HIGHcore/tests/window/test_dialogs.py0if no path is provided, a open file dialog will use the default directory.STRING
HIGHcore/tests/app/test_dialogs.py0if no path is provided, a select folder dialog will use the default directory.STRING
HIGHcore/tests/window/test_window.py0if no path is provided, a select folder dialog will use the default directory.STRING
HIGHcore/tests/window/test_dialogs.py0if no path is provided, a select folder dialog will use the default directory.STRING
HIGHcore/tests/widgets/test_scrollcontainer.py0if the widget is assigned to an app, the content is also assigned.STRING
HIGHcore/tests/widgets/test_optioncontainer.py0if the widget is assigned to an app, the content is also assigned.STRING
HIGHcore/tests/widgets/test_splitcontainer.py0if the widget is assigned to an app, the content is also assigned.STRING
HIGHcore/tests/widgets/test_scrollcontainer.py0if the widget is assigned to an app, and there is no content, there's no error.STRING
HIGHcore/tests/widgets/test_optioncontainer.py0if the widget is assigned to an app, and there is no content, there's no error.STRING
HIGHcore/tests/widgets/test_splitcontainer.py0if the widget is assigned to an app, and there is no content, there's no error.STRING
HIGHcore/tests/widgets/test_scrollcontainer.py0if the widget is assigned to a window, the content is also assigned.STRING
HIGHcore/tests/widgets/test_optioncontainer.py0if the widget is assigned to a window, the content is also assigned.STRING
HIGHcore/tests/widgets/test_splitcontainer.py0if the widget is assigned to a window, the content is also assigned.STRING
HIGHcore/tests/widgets/test_textinput.py0a multiline text input can be created with initial values.STRING
HIGHcore/tests/widgets/test_multilinetextinput.py0a multiline text input can be created with initial values.STRING
HIGHcore/tests/widgets/test_passwordinput.py0a multiline text input can be created with initial values.STRING
HIGHcore/src/toga/widgets/tree.py0is the widget currently enabled? i.e., can the user interact with the widget? canvas widgets cannot be disabled; this prSTRING
HIGHcore/src/toga/widgets/imageview.py0is the widget currently enabled? i.e., can the user interact with the widget? canvas widgets cannot be disabled; this prSTRING
HIGHcore/src/toga/widgets/box.py0is the widget currently enabled? i.e., can the user interact with the widget? canvas widgets cannot be disabled; this prSTRING
HIGHcore/src/toga/widgets/splitcontainer.py0is the widget currently enabled? i.e., can the user interact with the widget? canvas widgets cannot be disabled; this prSTRING
HIGHcore/src/toga/widgets/detailedlist.py0is the widget currently enabled? i.e., can the user interact with the widget? canvas widgets cannot be disabled; this prSTRING
HIGHcore/src/toga/widgets/divider.py0is the widget currently enabled? i.e., can the user interact with the widget? canvas widgets cannot be disabled; this prSTRING
HIGHcore/src/toga/widgets/activityindicator.py0is the widget currently enabled? i.e., can the user interact with the widget? canvas widgets cannot be disabled; this prSTRING
HIGHcore/src/toga/widgets/scrollcontainer.py0is the widget currently enabled? i.e., can the user interact with the widget? canvas widgets cannot be disabled; this prSTRING
HIGHcore/src/toga/widgets/progressbar.py0is the widget currently enabled? i.e., can the user interact with the widget? canvas widgets cannot be disabled; this prSTRING
HIGHcore/src/toga/widgets/table.py0is the widget currently enabled? i.e., can the user interact with the widget? canvas widgets cannot be disabled; this prSTRING
HIGHcore/src/toga/widgets/optioncontainer.py0is the widget currently enabled? i.e., can the user interact with the widget? canvas widgets cannot be disabled; this prSTRING
HIGHcore/src/toga/widgets/canvas/canvas.py0is the widget currently enabled? i.e., can the user interact with the widget? canvas widgets cannot be disabled; this prSTRING
HIGHcore/src/toga/widgets/multilinetextinput.py0a handler to invoke when the slider is pressed. :param widget: the slider that was released. :param kwargs: ensures compSTRING
HIGHcore/src/toga/widgets/switch.py0a handler to invoke when the slider is pressed. :param widget: the slider that was released. :param kwargs: ensures compSTRING
HIGHcore/src/toga/widgets/slider.py0a handler to invoke when the slider is pressed. :param widget: the slider that was released. :param kwargs: ensures compSTRING
HIGHcore/src/toga/widgets/numberinput.py0a handler to invoke when the slider is pressed. :param widget: the slider that was released. :param kwargs: ensures compSTRING
HIGHcore/src/toga/widgets/selection.py0a handler to invoke when the slider is pressed. :param widget: the slider that was released. :param kwargs: ensures compSTRING
HIGHcore/src/toga/widgets/multilinetextinput.py0can the value of the widget be modified by the user? this only controls manual changes by the user (i.e., typing at the STRING
HIGHcore/src/toga/widgets/textinput.py0can the value of the widget be modified by the user? this only controls manual changes by the user (i.e., typing at the STRING
HIGHcore/src/toga/widgets/numberinput.py0can the value of the widget be modified by the user? this only controls manual changes by the user (i.e., typing at the STRING
HIGHcore/src/toga/widgets/multilinetextinput.py0the handler to invoke when the value of the widget changes.STRING
HIGHcore/src/toga/widgets/textinput.py0the handler to invoke when the value of the widget changes.STRING
HIGHcore/src/toga/widgets/numberinput.py0the handler to invoke when the value of the widget changes.STRING
HIGHpositron/src/positron/sitespecific/bootstrap.py0runs prior to other plugin hooks to provide additional context. this can be used to prompt the user with additional quesSTRING
HIGHpositron/src/positron/static/bootstrap.py0runs prior to other plugin hooks to provide additional context. this can be used to prompt the user with additional quesSTRING
HIGHpositron/src/positron/fastapi/bootstrap.py0runs prior to other plugin hooks to provide additional context. this can be used to prompt the user with additional quesSTRING
HIGHpositron/src/positron/django/bootstrap.py0runs prior to other plugin hooks to provide additional context. this can be used to prompt the user with additional quesSTRING
HIGHtestbed/tests/widgets/test_tree.py0does the widget warn about the old listlistener apiSTRING
HIGHtestbed/tests/widgets/test_table.py0does the widget warn about the old listlistener apiSTRING
HIGHtestbed/tests/widgets/test_selection.py0does the widget warn about the old listlistener apiSTRING
HIGHtestbed/tests/widgets/test_detailedlist.py0does the widget warn about the old listlistener apiSTRING
HIGHweb/src/toga_web/command.py0command `native` property is a list of native widgets associated with the command. native widgets is of type qactionSTRING
HIGHtextual/src/toga_textual/command.py0command `native` property is a list of native widgets associated with the command. native widgets is of type qactionSTRING
HIGHqt/src/toga_qt/command.py0command `native` property is a list of native widgets associated with the command. native widgets is of type qactionSTRING
HIGHqt/src/toga_qt/fonts.py0use a font that the user has registered in their code.STRING
HIGHiOS/src/toga_iOS/fonts.py0use a font that the user has registered in their code.STRING
HIGHcocoa/src/toga_cocoa/fonts.py0use a font that the user has registered in their code.STRING
HIGHandroid/src/toga_android/fonts.py0use a font that the user has registered in their code.STRING
HIGHwinforms/src/toga_winforms/fonts.py0use a font that the user has registered in their code.STRING
HIGHgtk/src/toga_gtk/fonts.py0use a font that the user has registered in their code.STRING
HIGHiOS/tests_backend/probe.py0request a redraw of the app, waiting until that redraw has completed.STRING
HIGHiOS/tests_backend/widgets/base.py0request a redraw of the app, waiting until that redraw has completed.STRING
7 more matches not shown…
Empty Error Handlers64 hits · 320 pts
SeverityFileLineSnippetContext
HIGHdummy/src/toga_dummy/utils.py298except AttributeError:CODE
HIGHdummy/src/toga_dummy/utils.py312except AttributeError:CODE
HIGHdummy/src/toga_dummy/utils.py326except AttributeError:CODE
HIGHdummy/src/toga_dummy/app.py164except IndexError:CODE
HIGHcore/tests/conftest.py34except KeyError:CODE
HIGHcore/tests/conftest.py60except AttributeError:CODE
HIGHcore/tests/hardware/test_camera.py29except AttributeError:CODE
HIGHcore/tests/hardware/test_location.py21except AttributeError:CODE
HIGHcore/tests/app/test_app.py255except KeyError:CODE
HIGHcore/src/toga/command.py529except KeyError:CODE
HIGHcore/src/toga/command.py608except StopIteration:CODE
HIGHcore/src/toga/icons.py128except FileNotFoundError:CODE
HIGHcore/src/toga/app.py417except AttributeError:CODE
HIGHcore/src/toga/app.py245except KeyError:CODE
HIGHcore/src/toga/style/compat.py105except AttributeError:CODE
HIGHcore/src/toga/style/compat.py115except AttributeError:CODE
HIGHcore/src/toga/style/layout.py110except UnknownFontError:CODE
HIGHcore/src/toga/style/layout.py546except AttributeError:CODE
HIGHcore/src/toga/style/layout.py614except AttributeError:CODE
HIGHcore/src/toga/sources/list_source.py60except AttributeError:CODE
HIGHtestbed/tests/test_images.py193except PermissionError:CODE
HIGHtestbed/tests/test_paths.py34except PermissionError:CODE
HIGHtestbed/tests/widgets/test_slider.py173except NotImplementedError:CODE
HIGHtestbed/src/testbed/app.py235except TimeoutError:CODE
HIGHqt/src/toga_qt/keys.py134except AttributeError:CODE
HIGHtextual/src/toga_textual/widgets/textinput.py61except NoActiveAppError:CODE
HIGHiOS/tests_backend/hardware/location.py100except AttributeError:CODE
HIGHiOS/tests_backend/hardware/camera.py104except AttributeError:CODE
HIGHiOS/src/toga_iOS/widgets/progressbar.py34except asyncio.CancelledError:CODE
HIGHiOS/src/toga_iOS/widgets/mapview.py103except KeyError: # pragma: no coverCODE
HIGHiOS/src/toga_iOS/widgets/mapview.py107except KeyError: # pragma: no coverCODE
HIGHcocoa/tests_backend/hardware/location.py100except AttributeError:CODE
HIGHcocoa/src/toga_cocoa/widgets/tree.py255except AttributeError:CODE
HIGHcocoa/src/toga_cocoa/widgets/mapview.py103except KeyError: # pragma: no coverCODE
HIGHcocoa/src/toga_cocoa/widgets/mapview.py107except KeyError: # pragma: no coverCODE
HIGHcocoa/src/toga_cocoa/widgets/optioncontainer.py112except KeyError:CODE
HIGHexamples/screenshot/screenshot/app.py483except NotImplementedError:CODE
HIGHexamples/scrollcontainer/scrollcontainer/app.py138except ValueError:CODE
HIGHexamples/scrollcontainer/scrollcontainer/app.py146except ValueError:CODE
HIGHexamples/scrollcontainer/scrollcontainer/app.py154except ValueError:CODE
HIGHexamples/scrollcontainer/scrollcontainer/app.py162except ValueError:CODE
HIGHexamples/table_source/table_source/app.py109except KeyError:CODE
HIGHandroid/tests_backend/hardware/location.py32except AttributeError:CODE
HIGHandroid/src/toga_android/widgets/base.py209except ReferenceError: # pragma: no coverCODE
HIGHtravertino/src/travertino/properties/shorthand.py148except ValueError:CODE
HIGHtravertino/src/travertino/properties/validated.py80except AttributeError:CODE
HIGHtravertino/src/travertino/properties/choices.py36except AttributeError:CODE
HIGHtravertino/src/travertino/properties/choices.py41except (ValueError, TypeError):CODE
HIGHtravertino/src/travertino/properties/choices.py46except (ValueError, TypeError):CODE
HIGHtravertino/src/travertino/properties/choices.py51except ValueError:CODE
HIGHwinforms/tests_backend/app.py260except KeyError:CODE
HIGHwinforms/tests_backend/widgets/dateinput.py44except ArgumentOutOfRangeException:CODE
HIGHwinforms/tests_backend/widgets/timeinput.py24except ArgumentOutOfRangeException:CODE
HIGHwinforms/src/toga_winforms/keys.py82except AttributeError:CODE
HIGHwinforms/src/toga_winforms/keys.py116except AttributeError:CODE
HIGHwinforms/src/toga_winforms/keys.py152except ValueError:CODE
HIGHwinforms/src/toga_winforms/widgets/detailedlist.py725except AttributeError:CODE
HIGHgtk/tests_backend/app.py145except IndexError:CODE
HIGHgtk/tests_backend/hardware/location.py107except AttributeError:CODE
HIGHgtk/tests_backend/widgets/multilinetextinput.py58except KeyError:CODE
4 more matches not shown…
Over-Commented Block106 hits · 106 pts
SeverityFileLineSnippetContext
LOWpyproject.toml1[tool.codespell]COMMENT
LOWdummy/src/toga_dummy/app.py81 # 768 |Secondary| |COMMENT
LOWcore/tests/test_validators.py721COMMENT
LOWcore/tests/window/test_window.py61 # .NET Framework 4.x WinForms fires `Activated` *during* the platformCOMMENT
LOWcore/tests/command/test_commandset.py381):COMMENT
LOWcore/tests/command/test_group.py281# grandparent.parent = childCOMMENT
LOWcore/src/toga/command.py541 return groupCOMMENT
LOWcore/src/toga/app.py221 self._app_name = NoneCOMMENT
LOWcore/src/toga/constants/__init__.py41 # These constant values allow `flash=True` and `flash=False` to workCOMMENT
LOWcore/src/toga/constants/__init__.py61# """COMMENT
LOWcore/src/toga/style/layout.py581 direction=self.direction,COMMENT
LOWcore/src/toga/style/applicator.py61COMMENT
LOWtestbed/tests/widgets/test_mapview.py61 # On Gtk, ensure that the MapView evades garbage collection by keeping aCOMMENT
LOWqt/src/toga_qt/window.py101 def qt_close_event(self, event):COMMENT
LOWqt/src/toga_qt/window.py121 def create(self):COMMENT
LOWtextual/pyproject.toml81SimpleStatusIcon = "toga_textual.statusicons:SimpleStatusIcon"COMMENT
LOWtextual/src/toga_textual/factory.py21# from .widgets.dateinput import DateInputCOMMENT
LOWtextual/src/toga_textual/factory.py61 # "Canvas",COMMENT
LOWiOS/src/toga_iOS/window.py161 # Window visibilityCOMMENT
LOWiOS/src/toga_iOS/window.py181 # Windows are always in NORMAL state.COMMENT
LOWiOS/src/toga_iOS/window.py201 # size. You'd *think* that you could specify the size of the finalCOMMENT
LOWiOS/src/toga_iOS/app.py141 ######################################################################COMMENT
LOWiOS/src/toga_iOS/widgets/progressbar.py1import asyncioCOMMENT
LOWiOS/src/toga_iOS/widgets/mapview.py61 self.native.zoomEnabled = TrueCOMMENT
LOWiOS/src/toga_iOS/widgets/canvas.py301 # "This method uses the baseline origin by default. IfCOMMENT
LOWcocoa/tests_backend/keys.py81 # Key.RIGHT_SHIFT.value: 60,COMMENT
LOWcocoa/src/toga_cocoa/window.py401 # user-requested state and apply the state when we have completed processing aCOMMENT
LOWcocoa/src/toga_cocoa/keys.py201 # Experimentation shows the following behaviourCOMMENT
LOWcocoa/src/toga_cocoa/widgets/tree.py101 # heights = [default_row_height]COMMENT
LOWcocoa/src/toga_cocoa/widgets/tree.py121COMMENT
LOWcocoa/src/toga_cocoa/widgets/mapview.py61 self.native.zoomEnabled = TrueCOMMENT
LOWcocoa/src/toga_cocoa/widgets/table.py81 # 2021-09-04: Commented out this method because it appears to be aCOMMENT
LOWcocoa/src/toga_cocoa/widgets/canvas.py281 # NSStringDrawingUsesLineFragmentOrigin is not specified, theCOMMENT
LOWcocoa/src/toga_cocoa/widgets/internal/refresh.py41# Permission is hereby granted, free of charge, to any person obtaining a copy of thisCOMMENT
LOWcocoa/src/toga_cocoa/widgets/internal/refresh.py61# RefreshableScrollView is a subclass of NSScrollView. When it is created, it isCOMMENT
LOWexamples/tree/tree/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/screenshot/screenshot_qt/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/screenshot/screenshot/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/imageview/imageview/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/hardware/hardware/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/tree_source/tree_source/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/box/box/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/tutorial3/tutorial/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/tutorial4/tutorial/__init__.py1# Examples of valid version stringsCOMMENT
LOW…t/helloworld/src/hello_world_widget/gtk_hello_world.py41 # print(COMMENT
LOWexamples/statusiconapp/statusiconapp/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/tutorial2/tutorial/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/tutorial2/tutorial/app.py61COMMENT
LOWexamples/scrollcontainer/scrollcontainer/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/layout/layout/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/textinput/textinput/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/webview/webview/__init__.py1# Examples of valid version stringsCOMMENT
LOW…amples/examples_overview/examples_overview/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/splitcontainer/splitcontainer/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/slider/slider/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/table_source/table_source/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/progressbar/progressbar/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/focus/focus/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/detailedlist/detailedlist/__init__.py1# Examples of valid version stringsCOMMENT
LOWexamples/canvas/canvas/__init__.py1# Examples of valid version stringsCOMMENT
46 more matches not shown…
Excessive Try-Catch Wrapping55 hits · 74 pts
SeverityFileLineSnippetContext
LOWcore/tests/window/test_window.py496 except Exception as e:CODE
LOWcore/tests/window/test_window.py518 except Exception as e:CODE
LOWcore/src/toga/documents.py356 except Exception:CODE
LOW⚡core/src/toga/handlers.py62 except Exception as e:CODE
MEDIUM⚡core/src/toga/handlers.py63 print("Error in long running handler:", e, file=sys.stderr)CODE
LOW⚡core/src/toga/handlers.py69 except Exception as e:CODE
MEDIUM⚡core/src/toga/handlers.py70 print("Error in long running handler cleanup:", e, file=sys.stderr)CODE
LOW⚡core/src/toga/handlers.py84 except Exception as e:CODE
MEDIUM⚡core/src/toga/handlers.py85 print("Error in async handler:", e, file=sys.stderr)CODE
LOW⚡core/src/toga/handlers.py91 except Exception as e:CODE
MEDIUM⚡core/src/toga/handlers.py92 print("Error in async handler cleanup:", e, file=sys.stderr)CODE
LOWcore/src/toga/handlers.py163 except Exception as e:CODE
MEDIUMcore/src/toga/handlers.py164 print("Error in handler:", e, file=sys.stderr)CODE
LOWcore/src/toga/handlers.py176 except Exception as e:CODE
MEDIUMcore/src/toga/handlers.py177 print("Error in handler cleanup:", e, file=sys.stderr)CODE
LOWcore/src/toga/handlers.py189 except Exception as e:CODE
MEDIUMcore/src/toga/handlers.py190 print("Error in handler cleanup:", e, file=sys.stderr)CODE
LOWcore/src/toga/app.py548 except Exception:CODE
LOWcore/src/toga/app.py572 except Exception as e:CODE
LOWtestbed/tests/window/test_window.py864 except Exception as e:CODE
LOWweb/src/toga_web/widgets/dateinput.py27 except Exception:CODE
LOWweb/src/toga_web/widgets/dateinput.py36 except Exception:CODE
MEDIUMweb/src/toga_web/widgets/dateinput.py24def dom_change(self, event):CODE
MEDIUMweb/src/toga_web/widgets/dateinput.py33def get_value(self):CODE
LOWweb/src/toga_web/widgets/timeinput.py40 except Exception:CODE
LOWweb/src/toga_web/widgets/timeinput.py49 except Exception:CODE
MEDIUMweb/src/toga_web/widgets/timeinput.py37def dom_change(self, event):CODE
MEDIUMweb/src/toga_web/widgets/timeinput.py46def get_value(self):CODE
LOWqt/tests_backend/dialogs.py40 except Exception as e:CODE
LOWqt/src/toga_qt/widgets/tree.py146 except Exception: # pragma: no coverCODE
LOWqt/src/toga_qt/widgets/tree.py158 except Exception: # pragma: no coverCODE
LOWqt/src/toga_qt/widgets/tree.py199 except Exception: # pragma: no coverCODE
LOWqt/src/toga_qt/widgets/tree.py220 except Exception: # pragma: no coverCODE
LOWqt/src/toga_qt/widgets/detailedlist.py103 except Exception: # pragma: no coverCODE
LOWqt/src/toga_qt/widgets/detailedlist.py125 except Exception: # pragma: no coverCODE
LOWqt/src/toga_qt/widgets/table.py65 except Exception: # pragma: no coverCODE
LOWqt/src/toga_qt/widgets/table.py77 except Exception: # pragma: no coverCODE
LOWqt/src/toga_qt/widgets/table.py123 except Exception: # pragma: no coverCODE
LOWqt/src/toga_qt/widgets/table.py143 except Exception: # pragma: no coverCODE
LOWqt/src/toga_qt/widgets/canvas.py301 except Exception: # pragma: no coverCODE
LOWtextual/tests_backend/probe.py28 except Exception:CODE
LOW⚡iOS/tests_backend/dialogs.py35 except Exception as e:CODE
LOWcocoa/tests_backend/window.py167 except Exception as e:CODE
LOWexamples/webview/webview/app.py24 except Exception as exc:CODE
MEDIUMexamples/webview/webview/app.py20def on_bad_js(self, widget, **kwargs):CODE
LOWandroid/tests_backend/dialogs.py31 except Exception as e:CODE
LOWandroid/tests_backend/widgets/dateinput.py35 except Exception:CODE
MEDIUMandroid/tests_backend/widgets/dateinput.py23def change(self, delta):CODE
LOWtravertino/src/travertino/style.py105 except Exception as exc:CODE
LOWtravertino/src/travertino/fonts.py31 except Exception as exc:CODE
LOWwinforms/tests_backend/dialogs.py42 except Exception as e:CODE
LOWwinforms/src/toga_winforms/app.py143 except Exception as e:CODE
LOWgtk/tests_backend/dialogs.py52 except Exception as e:CODE
LOWgtk/src/toga_gtk/widgets/mapview.py136 except Exception as e:CODE
LOWgtk/src/toga_gtk/widgets/webview.py122 except Exception as e:CODE
Deep Nesting63 hits · 63 pts
SeverityFileLineSnippetContext
LOWdummy/src/toga_dummy/utils.py343CODE
LOWcore/src/toga/command.py535CODE
LOWcore/src/toga/command.py557CODE
LOWcore/src/toga/icons.py76CODE
LOWcore/src/toga/icons.py179CODE
LOWcore/src/toga/documents.py312CODE
LOWcore/src/toga/handlers.py129CODE
LOWcore/src/toga/handlers.py155CODE
LOWcore/src/toga/app.py156CODE
LOWcore/src/toga/app.py576CODE
LOWcore/src/toga/fonts.py42CODE
LOWcore/src/toga/style/layout.py61CODE
LOWcore/src/toga/style/layout.py367CODE
LOWcore/src/toga/widgets/tree.py376CODE
LOWcore/src/toga/widgets/imageview.py15CODE
LOWcore/src/toga/widgets/table.py394CODE
LOWtestbed/tests/test_images.py145CODE
LOWtestbed/tests/test_fonts.py97CODE
LOWtestbed/tests/assertions.py33CODE
LOWtestbed/tests/testbed.py17CODE
LOWtestbed/tests/window/test_window.py791CODE
LOWtestbed/tests/window/test_window.py820CODE
LOWqt/tests_backend/probe.py90CODE
LOWqt/tests_backend/widgets/properties.py7CODE
LOWqt/src/toga_qt/window.py258CODE
LOWqt/src/toga_qt/widgets/tree.py162CODE
LOWqt/src/toga_qt/widgets/tree.py205CODE
LOWqt/src/toga_qt/widgets/table.py81CODE
LOWqt/src/toga_qt/widgets/table.py129CODE
LOWcocoa/tests_backend/window.py32CODE
LOWcocoa/src/toga_cocoa/window.py384CODE
LOWcocoa/src/toga_cocoa/keys.py196CODE
LOWexamples/tree/tree/app.py70CODE
LOWexamples/screenshot/screenshot/app.py363CODE
LOWexamples/textinput/textinput/app.py143CODE
LOWexamples/progressbar/progressbar/app.py115CODE
LOWexamples/passwordinput/passwordinput/app.py15CODE
LOWandroid/tests_backend/window.py24CODE
LOWandroid/src/toga_android/app.py116CODE
LOWandroid/src/toga_android/libs/events.py173CODE
LOWtravertino/src/travertino/style.py81CODE
LOWtravertino/src/travertino/node.py163CODE
LOWtravertino/src/travertino/colors.py26CODE
LOWtravertino/src/travertino/colors.py360CODE
LOWtravertino/src/travertino/properties/validated.py76CODE
LOWwinforms/tests_backend/widgets/detailedlist.py44CODE
LOWwinforms/tests_backend/widgets/table.py28CODE
LOWwinforms/src/toga_winforms/window.py578CODE
LOWwinforms/src/toga_winforms/widgets/tree.py488CODE
LOWwinforms/src/toga_winforms/widgets/tree.py860CODE
LOWwinforms/src/toga_winforms/widgets/detailedlist.py313CODE
LOWwinforms/src/toga_winforms/widgets/detailedlist.py368CODE
LOWgtk/tests_backend/window.py53CODE
LOWgtk/tests_backend/probe.py22CODE
LOWgtk/tests_backend/app.py117CODE
LOWgtk/src/toga_gtk/window.py152CODE
LOWgtk/src/toga_gtk/window.py341CODE
LOWgtk/src/toga_gtk/window.py519CODE
LOWgtk/src/toga_gtk/statusicons.py79CODE
LOWgtk/src/toga_gtk/dialogs.py163CODE
3 more matches not shown…
Modern Structural Boilerplate44 hits · 52 pts
SeverityFileLineSnippetContext
LOWdummy/src/toga_dummy/factory.py46__all__ = [CODE
LOWcore/src/toga/handlers.py231 def set_result(self, result: object) -> None:CODE
LOWcore/src/toga/handlers.py237 def set_exception(self, exc: Exception) -> None:CODE
LOWcore/src/toga/app.py1009 def set_full_screen(self, *windows: Window) -> None:CODE
LOWcore/src/toga/dialogs.py13__all__ = [CODE
LOWcore/src/toga/style/__init__.py4__all__ = [CODE
LOWcore/src/toga/style/applicator.py48 def set_bounds(self) -> None:CODE
LOWcore/src/toga/style/applicator.py59 def set_text_align(self, alignment: str) -> None:CODE
LOWcore/src/toga/style/applicator.py62 def set_hidden(self, hidden: bool) -> None:CODE
LOW⚡core/src/toga/style/applicator.py78 def set_font(self, font: object) -> None:CODE
LOW⚡core/src/toga/style/applicator.py81 def set_color(self, color: object) -> None:CODE
LOW⚡core/src/toga/style/applicator.py84 def set_background_color(self, color: object) -> None:CODE
LOWcore/src/toga/sources/__init__.py13__all__ = [CODE
LOWcore/src/toga/widgets/slider.py128 def _set_value(self, value: SupportsFloat) -> None:CODE
LOW⚡core/src/toga/widgets/slider.py305 def set_value(self, value: float) -> None: ...CODE
LOW⚡core/src/toga/widgets/slider.py311 def set_min(self, value: float) -> None: ...CODE
LOW⚡core/src/toga/widgets/slider.py317 def set_max(self, value: float) -> None: ...CODE
LOW⚡core/src/toga/widgets/slider.py323 def set_tick_count(self, tick_count: int | None) -> None: ...CODE
LOW⚡core/src/toga/widgets/slider.py344 def set_value(self, value: float) -> None:CODE
LOW⚡core/src/toga/widgets/slider.py354 def set_min(self, value: float) -> None:CODE
LOW⚡core/src/toga/widgets/slider.py360 def set_max(self, value: float) -> None:CODE
LOW⚡core/src/toga/widgets/slider.py366 def set_tick_count(self, tick_count: int | None) -> None:CODE
LOW⚡core/src/toga/widgets/slider.py386 def set_int_value(self, value: int) -> None: ...CODE
LOW⚡core/src/toga/widgets/slider.py392 def set_int_max(self, max: int) -> None: ...CODE
LOW⚡core/src/toga/widgets/slider.py395 def set_ticks_visible(self, visible: bool) -> None: ...CODE
LOWcore/src/toga/widgets/webview.py94 def _set_url(self, url: str | None, future: asyncio.Future | None) -> None:CODE
LOWcore/src/toga/widgets/webview.py210 def set_content(self, root_url: str, content: str) -> None:CODE
LOWcore/src/toga/widgets/canvas/__init__.py56__all__ = [CODE
LOWweb/src/toga_web/factory.py56__all__ = [CODE
LOWqt/src/toga_qt/factory.py56__all__ = [CODE
LOWqt/src/toga_qt/widgets/tree.py16logger = logging.getLogger(__name__)CODE
LOWqt/src/toga_qt/widgets/detailedlist.py31logger = logging.getLogger(__name__)CODE
LOW⚡qt/src/toga_qt/widgets/slider.py32 def set_int_value(self, value: int) -> None:CODE
LOW⚡qt/src/toga_qt/widgets/slider.py38 def set_int_max(self, max: int) -> None:CODE
LOW⚡qt/src/toga_qt/widgets/slider.py41 def set_ticks_visible(self, visible: bool) -> None:CODE
LOWqt/src/toga_qt/widgets/table.py13logger = logging.getLogger(__name__)CODE
LOWqt/src/toga_qt/widgets/canvas.py24logger = logging.getLogger(__name__)CODE
LOWtextual/src/toga_textual/factory.py56__all__ = [CODE
LOWiOS/src/toga_iOS/factory.py59__all__ = [CODE
LOWcocoa/src/toga_cocoa/factory.py55__all__ = [CODE
LOWandroid/src/toga_android/factory.py51__all__ = [CODE
LOWtravertino/src/travertino/colors.py560__all__ = [CODE
LOWwinforms/src/toga_winforms/factory.py51__all__ = [CODE
LOWgtk/src/toga_gtk/factory.py50__all__ = [CODE
Decorative Section Separators16 hits · 48 pts
SeverityFileLineSnippetContext
MEDIUMcore/src/toga/platform.py227 # -------------------------------------------------------------------------COMMENT
MEDIUMcore/src/toga/platform.py229 # -------------------------------------------------------------------------COMMENT
MEDIUMcore/src/toga/platform.py246 # -------------------------------------------------------------------------COMMENT
MEDIUMcore/src/toga/platform.py248 # -------------------------------------------------------------------------COMMENT
MEDIUMcore/src/toga/widgets/numberinput.py19# ====================COMMENT
MEDIUMiOS/src/toga_iOS/widgets/slider.py15# ====================COMMENT
MEDIUMiOS/src/toga_iOS/widgets/progressbar.py9# ====================COMMENT
MEDIUMcocoa/src/toga_cocoa/widgets/progressbar.py8# ====================COMMENT
MEDIUMcocoa/src/toga_cocoa/widgets/internal/refresh.py36# ======================================================================================COMMENT
MEDIUMcocoa/src/toga_cocoa/widgets/internal/refresh.py57# ======================================================================================COMMENT
MEDIUMandroid/src/toga_android/widgets/slider.py14# ====================COMMENT
MEDIUMandroid/src/toga_android/widgets/progressbar.py10# ====================COMMENT
MEDIUMwinforms/src/toga_winforms/widgets/slider.py12# ====================COMMENT
MEDIUMwinforms/src/toga_winforms/widgets/progressbar.py8# ====================COMMENT
MEDIUMgtk/src/toga_gtk/widgets/slider.py9# ====================COMMENT
MEDIUMgtk/src/toga_gtk/widgets/progressbar.py9# ====================COMMENT
Cross-Language Confusion6 hits · 45 pts
SeverityFileLineSnippetContext
HIGH⚡core/tests/sources/test_columns.py247 # Issue #4135: Tuple of 1 item is undefined; raise an errorCOMMENT
HIGH⚡core/tests/sources/test_columns.py249 # Issue #4135: Tuple of 3+ items is undefined; raise an errorCOMMENT
HIGHcore/src/toga/window.py364 undefined, except for [`closed`][toga.Window.closed] which can be used to checkSTRING
HIGHtestbed/tests/widgets/test_tree.py895 # The specific behavior for resizing is undefined; however, the columns should addCOMMENT
HIGHtestbed/tests/widgets/test_table.py565 # The specific behavior for resizing is undefined; however, the columns should addCOMMENT
HIGHandroid/src/toga_android/widgets/multilinetextinput.py35 self.native.setSelection(self.native.length())CODE
AI Slop Vocabulary18 hits · 42 pts
SeverityFileLineSnippetContext
LOWdummy/src/toga_dummy/images.py17# around a PIL image. We can't just use a PIL image because that will beCOMMENT
MEDIUMcore/tests/app/test_app.py178 # Invoking in a test harness, where there's no __main__COMMENT
LOWcore/src/toga/widgets/canvas/state.py673 # This is a weird one. The straightforward approach would be to simply add aCOMMENT
MEDIUMtestbed/tests/widgets/properties.py570 # (Definitely less than the window size)COMMENT
LOWweb/src/toga_web/widgets/base.py77 # otherwise just return what was asked forCOMMENT
LOWqt/tests_backend/fonts.py36 # Most other fonts we can just use the family name;COMMENT
MEDIUMqt/src/toga_qt/app.py140 # We can't call this under test conditions, because it would kill the test harnessCOMMENT
MEDIUMqt/src/toga_qt/app.py194 # A reference to the about dialog is stored for facilitate testing.COMMENT
LOWiOS/tests_backend/fonts.py71 # Most other fonts we can just use the family name;COMMENT
MEDIUMiOS/src/toga_iOS/libs/core_graphics.py48 # An except AttributeError would theoretically be more robust, but thatCOMMENT
MEDIUMcocoa/tests_backend/keys.py18# For a comprehensive list see:COMMENT
LOWcocoa/tests_backend/fonts.py69 # Most other fonts we can just use the family name;COMMENT
MEDIUMcocoa/src/toga_cocoa/app.py336 # We can't call this under test conditions, because it would kill the test harnessCOMMENT
MEDIUMcocoa/src/toga_cocoa/libs/core_graphics.py47 # An except AttributeError would theoretically be more robust, but thatCOMMENT
MEDIUMexamples/positron-django/src/positron/settings.py20# Django best practices in production don't apply. The secret key doesn't need to beCOMMENT
LOWandroid/src/toga_android/libs/events.py190 # just add them to ready. Note: We run all currently scheduled callbacks, butCOMMENT
LOWtravertino/tests/test_choices.py406 # We can't just use the string directly, though - that wouldCOMMENT
MEDIUMgtk/src/toga_gtk/app.py169 # We can't call this under test conditions, because it would kill the test harnessCOMMENT
Fake / Example Data32 hits · 40 pts
SeverityFileLineSnippetContext
LOWdummy/src/toga_dummy/widgets/multilinetextinput.py16 return self._get_value("placeholder")CODE
LOWdummy/src/toga_dummy/widgets/multilinetextinput.py19 self._set_value("placeholder", value)CODE
LOWdummy/src/toga_dummy/widgets/textinput.py15 return self._get_value("placeholder", "")CODE
LOWdummy/src/toga_dummy/widgets/textinput.py18 self._set_value("placeholder", value)CODE
LOWcore/tests/widgets/test_textinput.py198 assert attribute_value(widget, "placeholder") == expectedCODE
LOWcore/tests/widgets/test_multilinetextinput.py131 assert attribute_value(widget, "placeholder") == expectedCODE
LOW⚡testbed/tests/widgets/properties.py143 widget.placeholder = "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py147 assert widget.placeholder == "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py151 widget.value = "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py153 assert widget.value == "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py154 assert widget.placeholder == "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py155 assert probe.value == "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py162 assert widget.placeholder == "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py163 assert probe.value == "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py178 widget.placeholder = "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py185 assert widget.placeholder == "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py186 assert probe.value == "" if hides_on_focus else "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py193 assert widget.placeholder == "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py194 assert probe.value == "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py201 assert widget.placeholder == "placeholder"CODE
LOW⚡testbed/tests/widgets/properties.py202 assert probe.value == "" if hides_on_focus else "placeholder"CODE
LOWtestbed/tests/widgets/properties.py256 widget.placeholder = "placeholder"CODE
LOWtestbed/tests/widgets/properties.py265 assert probe.value == "placeholder"CODE
LOWtestbed/tests/widgets/test_textinput.py53@pytest.fixture(params=["", "placeholder"])CODE
LOWtestbed/tests/widgets/test_multilinetextinput.py144 widget.value = "Topline\n" + "Lorem ipsum\n " * 100CODE
LOWtestbed/tests/widgets/test_webview.py251 large_content = f"<p>{'lorem ipsum ' * 200000}</p>"CODE
LOWexamples/webview/webview/app.py86 large_content = f"<p>{'lorem ipsum ' * 200000}</p>"CODE
LOWexamples/colors/colors/app.py37 placeholder="placeholder",CODE
LOWexamples/colors/colors/app.py62 value="This is a Text input field!", placeholder="placeholder"CODE
LOW⚡travertino/compat/test_compat.py65 match=r"Pack.__init__\(\) got an unexpected keyword argument 'fake_name'",CODE
LOW⚡travertino/compat/test_compat.py67 _ = Pack(fake_name=False)CODE
LOWgtk/src/toga_gtk/widgets/multilinetextinput.py35 "placeholder", foreground="gray"CODE
Redundant / Tautological Comments23 hits · 38 pts
SeverityFileLineSnippetContext
LOWcore/tests/test_documents.py137 # Read the fileCOMMENT
LOWcore/tests/test_documents.py160 # Read the fileCOMMENT
LOW⚡core/tests/test_documents.py176 # Read the fileCOMMENT
LOW⚡core/tests/test_documents.py192 # Read the fileCOMMENT
LOWcore/tests/test_documents.py214 # Read the fileCOMMENT
LOWcore/tests/hardware/test_camera.py136 # Set permission to potentially allowedCOMMENT
LOWcore/tests/app/test_screens.py32 # Check if returned image is of type `toga.images.Image`, and the right sizeCOMMENT
LOWcore/tests/app/test_screens.py44 # Check if returned image is of type `PIL.Image.Image`, and the right sizeCOMMENT
LOWcore/tests/command/test_group.py73 # Assign None to variable to trick flake8 into not giving an E711COMMENT
LOWcore/tests/widgets/test_splitcontainer.py99 # Assign content to the split containerCOMMENT
LOWcore/src/toga/documents.py44 # Add the document to the list of managed documents.COMMENT
LOWcore/src/toga/widgets/optioncontainer.py391 # Add the option to the list maintained on the interface,COMMENT
LOWtestbed/tests/app/test_screens.py48 # Check if returned image is of type `toga.images.Image`.COMMENT
LOWtestbed/tests/app/test_screens.py59 # Check if returned image is of type `PIL.Image.Image`.COMMENT
LOWtestbed/tests/widgets/test_mapview.py92 # Set location to Margaret River, just south of PerthCOMMENT
LOWiOS/src/toga_iOS/widgets/webview.py224 # Set UIDelegate to self for file dialog supportCOMMENT
LOWcocoa/src/toga_cocoa/widgets/webview.py237 # Set UIDelegate to self for file dialog supportCOMMENT
LOWexamples/statusiconapp/statusiconapp/app.py8 # Set app to be a background appCOMMENT
LOWandroid/tests_backend/widgets/textinput.py43 # Check if TYPE_TEXT_FLAG_NO_SUGGESTIONS is set in the input typeCOMMENT
LOWandroid/src/toga_android/widgets/base.py130 # Set background to None, when TRANSPARENT is requested, in order to preventCOMMENT
LOW⚡travertino/tests/style/test_composite.py154 # Assign 5 to explicit_none, don't provide different_values_prop.COMMENT
LOW⚡travertino/tests/style/test_composite.py160 # Assign VALUE4 to different_values_prop, don't provide explicit_none.COMMENT
LOWwinforms/src/toga_winforms/window.py144 # Set MinimumSize to 0 temporarily, so the window size setting is notCOMMENT
AI Structural Patterns11 hits · 11 pts
SeverityFileLineSnippetContext
LOWcore/src/toga/command.py252CODE
LOWcore/src/toga/window.py204CODE
LOWcore/src/toga/app.py156CODE
LOWcore/src/toga/widgets/tree.py36CODE
LOWcore/src/toga/widgets/detailedlist.py52CODE
LOWcore/src/toga/widgets/textinput.py49CODE
LOWcore/src/toga/widgets/slider.py43CODE
LOWcore/src/toga/widgets/numberinput.py81CODE
LOWcore/src/toga/widgets/table.py36CODE
LOWcore/src/toga/widgets/canvas/canvas.py135CODE
LOWqt/src/toga_qt/widgets/mapview.py43CODE
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHexamples/tutorial2/tutorial/app.py70 # a narrower one. In this example, the right container will be twiceCOMMENT
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHcocoa/src/toga_cocoa/widgets/webview.py150Required by the WKUIDelegate protocol. Called when the user clicks on an <input type="file"> HTML tag, STRING
Slop Phrases2 hits · 4 pts
SeverityFileLineSnippetContext
LOWcocoa/src/toga_cocoa/widgets/textinput.py36 # If you add a method to this proxy, make sure you add a hook to both theCOMMENT
MEDIUMexamples/detailedlist/detailedlist/app.py31 # to use refresh. However, for demonstration purposes, lets pretendCOMMENT
Overly Generic Function Names4 hits · 4 pts
SeverityFileLineSnippetContext
LOWexamples/statusiconapp/statusiconapp/app.py78 def do_stuff(self, widget, **kwargs):CODE
LOWexamples/activityindicator/activityindicator/app.py7 def do_stuff(self, widget, **kwargs):CODE
LOWexamples/command/command/app.py7 def do_stuff(self, widget, **kwargs):CODE
LOWexamples/numberinput/numberinput/app.py7 def do_stuff(self, widget, **kwargs):CODE
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippetContext
LOWcocoa/src/toga_cocoa/window.py404 # Here, we need to check if the current state is the same as the pendingCOMMENT