A retro game engine for Python
This report presents the forensic synthetic code analysis of kitao/pyxel, a Rust project with 17,581 GitHub stars. SynthScan v2.0 examined 69,462 lines of code across 239 source files, recording 355 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 6.4 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
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.
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.
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.
The scanner identified 355 distinct pattern matches across 9 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/pyxel/cli.py | 172 | def _run_python_script_in_separate_process(python_script_file): | CODE |
| LOW | python/pyxel/cli.py | 244 | def watch_and_run_python_script(watch_dir: str, python_script_file: str) -> None: | CODE |
| LOW | python/pyxel/cli.py | 383 | def create_executable_from_pyxel_app(pyxel_app_file: str) -> None: | CODE |
| LOW | python/pyxel/cli.py | 437 | def create_html_from_pyxel_app(pyxel_app_file: str) -> None: | CODE |
| LOW | python/pyxel/editor/tilemap_editor.py | 122 | def __on_tilemap_picker_change(self, value): | CODE |
| LOW | python/pyxel/editor/tilemap_editor.py | 125 | def __on_tilemap_picker_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/sound_editor.py | 206 | def __on_sound_picker_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/sound_editor.py | 215 | def __on_play_button_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/sound_editor.py | 221 | def __on_stop_button_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/sound_editor.py | 224 | def __on_loop_button_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/music_editor.py | 162 | def __on_music_picker_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/music_editor.py | 168 | def __on_play_button_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/music_editor.py | 174 | def __on_stop_button_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/music_editor.py | 177 | def __on_loop_button_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/app.py | 130 | def __on_editor_button_change(self, value): | CODE |
| LOW⚡ | python/pyxel/editor/app.py | 134 | def __on_editor_button_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/app.py | 140 | def __on_undo_button_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/app.py | 146 | def __on_redo_button_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/app.py | 152 | def __on_save_button_mouse_hover(self, _x, _y): | CODE |
| LOW | python/pyxel/editor/image_editor.py | 102 | def __on_color_picker_mouse_hover(self, _x, _y): | CODE |
| LOW | python/pyxel/editor/image_editor.py | 105 | def __on_image_picker_mouse_hover(self, _x, _y): | CODE |
| LOW | python/pyxel/editor/editor_base.py | 81 | def check_tool_button_shortcuts(self): | CODE |
| LOW⚡ | python/pyxel/editor/editor_base.py | 105 | def __on_number_picker_dec_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/editor_base.py | 108 | def __on_number_picker_inc_mouse_hover(self, _x, _y): | CODE |
| LOW⚡ | python/pyxel/editor/editor_base.py | 111 | def __on_tool_button_mouse_hover(self, x, y): | CODE |
| LOW | python/pyxel/editor/widgets/widget.py | 266 | def remove_var_event_listener(self, name, event, listener): | CODE |
| LOW | python/tests/test_music.py | 11 | def test_set_pads_to_num_channels(self): | CODE |
| LOW | python/tests/test_music.py | 40 | def test_set_overwrites_previous(self): | CODE |
| LOW | python/tests/test_music.py | 47 | def test_snds_list_aliases_seqs_deprecated(self, capfd): | CODE |
| LOW⚡ | python/tests/test_music.py | 65 | def test_seqs_inner_seq_access(self): | CODE |
| LOW⚡ | python/tests/test_music.py | 74 | def test_seqs_inner_seq_setitem(self): | CODE |
| LOW⚡ | python/tests/test_music.py | 82 | def test_seqs_inner_seq_append(self): | CODE |
| LOW⚡ | python/tests/test_music.py | 90 | def test_seqs_inner_seq_delitem(self): | CODE |
| LOW⚡ | python/tests/test_music.py | 97 | def test_seqs_append_new_channel(self): | CODE |
| LOW⚡ | python/tests/test_music.py | 105 | def test_seqs_setitem_channel(self): | CODE |
| LOW | python/tests/test_music.py | 129 | def test_seqs_reversed_step_one_slice_assignment_inserts(self): | CODE |
| LOW | python/tests/test_music.py | 199 | def test_seqs_from_list_deprecated(self, capfd): | CODE |
| LOW | python/tests/test_music.py | 206 | def test_seqs_to_list_deprecated(self, capfd): | CODE |
| LOW⚡ | python/tests/test_tilemap.py | 10 | def test_new_with_image_instance(self): | CODE |
| LOW⚡ | python/tests/test_tilemap.py | 16 | def test_imgsrc_read_write_int(self): | CODE |
| LOW⚡ | python/tests/test_tilemap.py | 23 | def test_imgsrc_read_write_image(self): | CODE |
| LOW⚡ | python/tests/test_tilemap.py | 29 | def test_pset_pget_returns_tuple(self): | CODE |
| LOW | python/tests/test_tilemap.py | 144 | def test_blt_with_tilemap_instance(self): | CODE |
| LOW | python/tests/test_tilemap.py | 188 | def test_clip_restricts_drawing(self): | CODE |
| LOW | python/tests/test_tilemap.py | 197 | def test_camera_offsets_drawing(self): | CODE |
| LOW | python/tests/test_tilemap.py | 214 | def test_from_tmx_masks_tile_flip_flags(self, tmp_path): | CODE |
| LOW | python/tests/test_tilemap.py | 275 | def test_collide_returns_tuple_of_floats(self): | CODE |
| LOW | python/tests/test_tilemap.py | 284 | def test_collide_horizontal_wall(self): | CODE |
| LOW | python/tests/test_tilemap.py | 296 | def test_collide_vertical_wall(self): | CODE |
| LOW | python/tests/test_tilemap.py | 313 | def test_collide_multiple_wall_tiles(self): | CODE |
| LOW⚡ | python/tests/test_tilemap.py | 326 | def test_collide_negative_direction(self): | CODE |
| LOW⚡ | python/tests/test_tilemap.py | 336 | def test_collide_empty_walls_list(self): | CODE |
| LOW⚡ | python/tests/test_tilemap.py | 346 | def test_image_property_aliases_imgsrc(self, capfd): | CODE |
| LOW⚡ | python/tests/test_tilemap.py | 353 | def test_image_setter_deprecated(self, capfd): | CODE |
| LOW⚡ | python/tests/test_tilemap.py | 361 | def test_refimg_property_aliases_imgsrc(self, capfd): | CODE |
| LOW⚡ | python/tests/test_tilemap.py | 368 | def test_refimg_setter_deprecated(self, capfd): | CODE |
| LOW⚡ | python/tests/test_utils.py | 5 | def test_returns_dict_with_system_and_local_keys(self, tmp_path): | CODE |
| LOW⚡ | python/tests/test_utils.py | 12 | def test_extracts_system_imports(self, tmp_path): | CODE |
| LOW⚡ | python/tests/test_utils.py | 19 | def test_extracts_from_imports(self, tmp_path): | CODE |
| LOW⚡ | python/tests/test_utils.py | 25 | def test_extracts_local_imports(self, tmp_path): | CODE |
| 255 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/pyxel/__init__.py | 18 | CODE | |
| LOW | python/pyxel/editor/__init__.py | 1 | CODE | |
| LOW | python/pyxel/editor/__init__.py | 2 | CODE | |
| LOW | python/pyxel/editor/widgets/__init__.py | 1 | CODE | |
| LOW | python/pyxel/editor/widgets/__init__.py | 2 | CODE | |
| LOW | python/pyxel/editor/widgets/__init__.py | 3 | CODE | |
| LOW | python/pyxel/editor/widgets/__init__.py | 4 | CODE | |
| LOW | python/pyxel/editor/widgets/__init__.py | 5 | CODE | |
| LOW | python/pyxel/editor/widgets/__init__.py | 6 | CODE | |
| LOW | python/pyxel/editor/widgets/__init__.py | 7 | CODE | |
| LOW | python/pyxel/editor/widgets/__init__.py | 8 | CODE | |
| LOW | python/pyxel/editor/widgets/__init__.py | 9 | CODE | |
| LOW | python/pyxel/editor/widgets/__init__.py | 10 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/pyxel/cli.py | 200 | CODE | |
| LOW | python/pyxel/cli.py | 244 | CODE | |
| LOW | python/pyxel/cli.py | 341 | CODE | |
| LOW | python/pyxel/utils.py | 49 | CODE | |
| LOW | python/pyxel/examples/10_platformer.py | 193 | CODE | |
| LOW | python/pyxel/examples/06_click_game.py | 59 | CODE | |
| LOW | python/pyxel/examples/07_snake.py | 123 | CODE | |
| LOW | python/pyxel/editor/canvas_panel.py | 283 | CODE | |
| LOW | python/pyxel/editor/piano_keyboard.py | 160 | CODE | |
| LOW | python/pyxel/editor/image_editor.py | 128 | CODE | |
| LOW | python/pyxel/editor/editor_base.py | 81 | CODE | |
| LOW | python/tests/_runner.py | 160 | CODE | |
| LOW | python/tests/_runner.py | 192 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | web/code-maker/index.html | 377 | resourceEditor.contentWindow.pyxelContext.pyodide.FS.readFile( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/pyxel/examples/09_shooter.py | 189 | # Create the player sprite. | COMMENT |
| MEDIUM | python/pyxel/examples/09_shooter.py | 205 | # Create the enemy sprite. | COMMENT |
| MEDIUM | python/pyxel/examples/04_sound_api.py | 8 | # Create the note icon sprite. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/pyxel-core/src/bgm_generator.rs | 1 | // Shared between Pyxel (https://github.com/kitao/pyxel) and | COMMENT |
| LOW | crates/pyxel-core/src/bgm_generator.rs | 61 | #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] | COMMENT |
| LOW | python/pyxel/editor/tilemap_editor.py | 21 | # tilemap_index_var | COMMENT |
| LOW | python/pyxel/editor/canvas_panel.py | 21 | COMMENT | |
| LOW | python/pyxel/editor/sound_editor.py | 21 | COMMENT | |
| LOW | python/pyxel/editor/widgets/widget.py | 21 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/pyxel/examples/15_tiled_map_file.py | 20 | # This example loads a PNG file as the tileset image, but you can also use | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | python/tests/test_utils.py | 46 | # Syntax error should not raise, just return empty/partial result. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/pyxel/editor/__init__.py | 4 | __all__ = ["App", "extensions"] | CODE |
| LOW | python/pyxel/editor/widgets/__init__.py | 12 | __all__ = [ | CODE |