Repository Analysis

astral-sh/ruff

An extremely fast Python linter and code formatter, written in Rust.

5.1 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of astral-sh/ruff, a Rust project with 48,562 GitHub stars. SynthScan v2.0 examined 975,465 lines of code across 3772 source files, recording 4937 pattern matches distributed across 24 syntactic categories. The overall adjusted score of 5.1 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).

5.1
Adjusted Score
5.1
Raw Score
100%
Time Factor
2026-07-14
Last Push
48.6K
Stars
Rust
Language
975.5K
Lines of Code
3.8K
Files
4.9K
Pattern Hits
2026-07-14
Scan Date
0.01
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 0HIGH 31MEDIUM 72LOW 4834

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 4937 distinct pattern matches across 24 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.

Over-Commented Block3892 hits · 3679 pts
SeverityFileLineSnippetContext
LOWCargo.toml321# The main differences here are to avoid stripping debug informationCOMMENT
LOW.markdownlint.yaml21MD024:COMMENT
LOWcrates/ty_site_packages/src/version.rs21COMMENT
LOWcrates/ty_site_packages/src/lib.rs41/// `uv run --with` invocations, meanwhile, "extend" a parent environmentCOMMENT
LOWcrates/ty_site_packages/src/lib.rs681///COMMENT
LOWcrates/ty_site_packages/src/lib.rs941 /// The base Conda environment; treated like a system Python environment.COMMENT
LOWcrates/ty_site_packages/src/lib.rs1221 /// We looked everywhere we could think of for the `site-packages` directory,COMMENT
LOWcrates/ty_site_packages/src/lib.rs1621 // at runtime), we can find this in [the non-Windows branch]:COMMENT
LOWcrates/ty_site_packages/src/lib.rs1821 system.dyn_clone(),COMMENT
LOWcrates/ty_site_packages/src/lib.rs2021 /// to find a sys prefix that will actually contain the stdlib.COMMENT
LOWcrates/ty_site_packages/src/lib.rs2101/// Enumeration of sources a `sys.prefix` path can come from.COMMENT
LOWcrates/ty_site_packages/src/lib.rs2201/// environments (the stdlib Python `venv` module, the third-partyCOMMENT
LOWcrates/ruff/tests/analyze_graph.rs821 let root = ChildPath::new(tempdir.path());COMMENT
LOWcrates/ruff/tests/cli/format.rs601#[test_case::test_case("json")]COMMENT
LOWcrates/ruff/tests/cli/lint.rs3801/// .COMMENT
LOWcrates/ruff/tests/cli/lint.rs4301COMMENT
LOWcrates/ruff/tests/cli/main.rs21mod show_settings;COMMENT
LOWcrates/ruff/tests/cli/main.rs41/// ```rust,no_runCOMMENT
LOWcrates/ruff/tests/cli/main.rs201 /// - The correct ruff binary pathCOMMENT
LOWcrates/ruff/src/cache.rs61/// `Cache` holds everything required to display the diagnostics for a singleCOMMENT
LOWcrates/ruff/src/cache.rs321/// On disk representation of a cache of a package.COMMENT
LOWcrates/ruff/src/args.rs61 /// Ignore all configuration files.COMMENT
LOWcrates/ruff/src/args.rs121)]COMMENT
LOWcrates/ruff/src/args.rs201 /// file to files that it depends on. Use `--direction dependents` to generate a map from fileCOMMENT
LOWcrates/ruff/src/args.rs221 python: Option<PathBuf>,COMMENT
LOWcrates/ruff/src/args.rs241 #[clap(long, overrides_with("fix"), hide = true)]COMMENT
LOWcrates/ruff/src/args.rs261 pub watch: bool,COMMENT
LOWcrates/ruff/src/args.rs401 /// Enforce exclusions, even for paths passed to Ruff directly on the command-line.COMMENT
LOWcrates/ruff/src/args.rs521COMMENT
LOWcrates/ruff/src/args.rs581 #[clap(long, overrides_with("force_exclude"), hide = true)]COMMENT
LOWcrates/ruff/src/args.rs601 no_preview: bool,COMMENT
LOWcrates/ruff/src/args.rs621COMMENT
LOWcrates/ruff/src/args.rs701/// Configuration-related arguments passed via the CLI.COMMENT
LOWcrates/ruff/src/args.rs961/// Enumeration to represent a single `--config` argumentCOMMENT
LOWcrates/ruff_python_literal/src/format.rs181 _ => (None, text),COMMENT
LOWcrates/ruff_python_literal/src/format.rs201/// Nested placeholders can include additional format specifiers.COMMENT
LOWcrates/ruff_python_trivia/src/textwrap.rs1//! Functions related to adding and removing indentation from lines ofCOMMENT
LOWcrates/ruff_python_trivia/src/textwrap.rs21///COMMENT
LOWcrates/ruff_python_trivia/src/textwrap.rs41/// assert_eq!(indent("foo = 123\n\nprint(foo)\n", "# "),COMMENT
LOWcrates/ruff_python_trivia/src/textwrap.rs81/// ```COMMENT
LOWcrates/ruff_python_trivia/src/textwrap.rs141/// ```COMMENT
LOWcrates/ruff_python_trivia/src/textwrap.rs181 result.push_str(&line.as_full_str()[prefix_len..]);COMMENT
LOWcrates/ruff_python_trivia/src/textwrap.rs201/// removed and the formfeeds reinstatedCOMMENT
LOWcrates/ruff_python_trivia/src/pragmas.rs1/// Returns `true` if a comment appears to be a pragma comment.COMMENT
LOWcrates/ruff_python_trivia/src/comments.rs61 position.is_own_line() && matches!(Self::from_comment(slice), Some(Self::Off))COMMENT
LOWcrates/ruff_python_trivia/src/comments.rs81COMMENT
LOWcrates/ruff_python_trivia/src/comment_ranges.rs121 source.line_end(node.end())COMMENT
LOWcrates/ruff_python_trivia/src/comment_ranges.rs141 /// # even though it is indentedCOMMENT
LOWcrates/ruff_index/src/vec.rs181// not the phantom data.COMMENT
LOWcrates/ruff_workspace/src/options.rs41use ruff_options_metadata::{OptionsMetadata, Visit};COMMENT
LOWcrates/ruff_workspace/src/options.rs61 /// variable, if set.COMMENT
LOWcrates/ruff_workspace/src/options.rs81 /// the parent's rule selection is inherited and both parent and childCOMMENT
LOWcrates/ruff_workspace/src/options.rs141COMMENT
LOWcrates/ruff_workspace/src/options.rs161 #[option(COMMENT
LOWcrates/ruff_workspace/src/options.rs181 /// `directory`). Note that these paths are relative to the project rootCOMMENT
LOWcrates/ruff_workspace/src/options.rs201 ///COMMENT
LOWcrates/ruff_workspace/src/options.rs221 /// A list of file patterns to include when linting, in addition to thoseCOMMENT
LOWcrates/ruff_workspace/src/options.rs241 /// excluded. Setting `force-exclude = true` will cause Ruff toCOMMENT
LOWcrates/ruff_workspace/src/options.rs261 /// included here not for configuration but because we lint whether e.g. theCOMMENT
LOWcrates/ruff_workspace/src/options.rs321 #[option(COMMENT
3832 more matches not shown…
Hyper-Verbose Identifiers612 hits · 582 pts
SeverityFileLineSnippetContext
LOW…ff_python_parser/resources/valid/statement/function.py9def positional_parameters_with_default_values(a, b=20, c=30):CODE
LOW…ff_python_parser/resources/valid/statement/function.py17def positional_only_and_positional_parameters(a, /, b, c):CODE
LOW…ff_python_parser/resources/valid/statement/function.py21def pos_args_with_defaults_and_varargs_and_kwargs(a, b=20, /, c=30, *args, **kwargs):CODE
LOW…ff_python_parser/resources/valid/statement/function.py29def keyword_only_parameters_with_defaults(*, a, b=20, c=30):CODE
LOW…ff_python_parser/resources/valid/statement/function.py33def kw_only_args_with_defaults_and_varargs(*args, a, b=20, c=30):CODE
LOW…ff_python_parser/resources/valid/statement/function.py37def kw_only_args_with_defaults_and_kwargs(*, a, b=20, c=30, **kwargs):CODE
LOW…ff_python_parser/resources/valid/statement/function.py41def kw_only_args_with_defaults_and_varargs_and_kwargs(*args, a, b=20, c=30, **kwargs):CODE
LOW…ff_python_parser/resources/valid/statement/function.py49def pos_and_kw_only_args_with_defaults(a, b, /, c, *, d, e=20, f=30):CODE
LOW…ff_python_parser/resources/valid/statement/function.py53def pos_and_kw_only_args_with_defaults_and_varargs(a, b, /, c, *args, d, e=20, f=30):CODE
LOW…ff_python_parser/resources/valid/statement/function.py57def pos_and_kw_only_args_with_defaults_and_kwargs(CODE
LOW…ff_python_parser/resources/valid/statement/function.py63def pos_and_kw_only_args_with_defaults_and_varargs_and_kwargs(CODE
LOW…ff_python_parser/resources/valid/statement/function.py69def positional_and_keyword_parameters(a, b, c, *, d, e, f):CODE
LOW…ff_python_parser/resources/valid/statement/function.py73def positional_and_keyword_parameters_with_defaults(a, b, c, *, d, e=20, f=30):CODE
LOW…ff_python_parser/resources/valid/statement/function.py77def positional_and_keyword_parameters_with_defaults_and_varargs(CODE
LOW…ff_python_parser/resources/valid/statement/function.py83def positional_and_keyword_parameters_with_defaults_and_varargs_and_kwargs(CODE
LOWcrates/ty_ide/src/rename.rs314class DataProcessor:CODE
LOWcrates/ty_ide/src/semantic_tokens.rs2799def function_with_annotations(param1: int, param2: str) -> Optional[List[str]]:CODE
LOWcrates/ty_ide/src/find_references.rs1075class DataProcessor:CODE
LOWcrates/ty_ide/src/find_references.rs1092 4 | class DataProcessor:CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py424def test_select_multiple_items_by_index(ds3):CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py434def test_select_multiple_items_by_slice(ds3):CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py444def test_select_item_by_iteminfo():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py986def test_int_is_valid_type_info():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py995def test_int_is_valid_unit_info():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1003def test_default_unit_from_type():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1312def test_concat_by_time_inconsistent_shape_not_possible():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1320def test_concat_by_time_no_time():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py57def test_create_wrong_data_type_error():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py169def test_index_with_attribute():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py228def test_getitem_multi_indexing_attempted(ds3):CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py277def test_select_subset_isel_axis_out_of_range_error(ds2):CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py294def test_select_temporal_subset_by_idx():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py314def test_temporal_subset_fancy():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py343def test_subset_with_datetime():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py401def test_select_multiple_items_by_name():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py463def test_select_subset_isel_multiple_idxs():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py511def test_create_named_undefined():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py528def test_to_dataframe_single_timestep():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py562def test_multidimensional_to_dataframe_no_supported():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py610def test_interp_time_to_other_dataset():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py673def test_extrapolate_not_allowed():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py719def test_modify_selected_variable():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py764def test_aggregation_workflows(tmpdir):CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py782def test_aggregation_dataset_no_time():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py813def test_to_dfs_extension_validation(tmpdir):CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py895def test_aggregate_across_items():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py914def test_aggregate_selected_items_dfsu_save_to_new_file(tmpdir):CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1021def test_default_name_from_type():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1036def test_iteminfo_string_type_should_fail_with_helpful_message():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1152def test_create_infer_name_from_eum():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1177def test_add_inconsistent_dataset(ds1):CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1269def test_concat_dataarray_by_time():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1350def test_renamed_dataset_has_updated_attributes(ds1: mikeio.Dataset):CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1458def test_merge_same_name_error():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1469def test_incompatible_data_not_allowed():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1535def test_create_dataset_with_many_items():CODE
LOWcrates/ruff_benchmark/resources/large/dataset.py1552def test_create_array_with_defaults_from_dataset():CODE
LOWcrates/ruff_benchmark/resources/tomllib/_parser.py275def skip_comments_and_array_ws(src: str, pos: Pos) -> Pos:CODE
LOWcrates/ruff_benchmark/resources/tomllib/_parser.py497def parse_basic_str_escape_multiline(src: str, pos: Pos) -> tuple[Pos, str]:CODE
LOWcrates/ruff_benchmark/resources/numpy/ctypeslib.py398 def _ctype_from_dtype_subarray(dtype):CODE
552 more matches not shown…
Unused Imports139 hits · 139 pts
SeverityFileLineSnippetContext
LOW…ruff_python_parser/resources/valid/statement/import.py1CODE
LOW…ruff_python_parser/resources/valid/statement/import.py2CODE
LOW…ruff_python_parser/resources/valid/statement/import.py3CODE
LOW…ruff_python_parser/resources/valid/statement/import.py4CODE
LOW…ruff_python_parser/resources/valid/statement/import.py4CODE
LOW…ruff_python_parser/resources/valid/statement/import.py4CODE
LOW…ruff_python_parser/resources/valid/statement/import.py5CODE
LOW…ruff_python_parser/resources/valid/statement/import.py5CODE
LOW…python_parser/resources/valid/statement/from_import.py1CODE
LOW…python_parser/resources/valid/statement/from_import.py2CODE
LOW…python_parser/resources/valid/statement/from_import.py3CODE
LOW…python_parser/resources/valid/statement/from_import.py3CODE
LOW…python_parser/resources/valid/statement/from_import.py4CODE
LOW…python_parser/resources/valid/statement/from_import.py5CODE
LOW…python_parser/resources/valid/statement/from_import.py6CODE
LOW…python_parser/resources/valid/statement/from_import.py7CODE
LOW…python_parser/resources/valid/statement/from_import.py8CODE
LOW…python_parser/resources/valid/statement/from_import.py8CODE
LOW…python_parser/resources/valid/statement/from_import.py8CODE
LOW…python_parser/resources/valid/statement/from_import.py9CODE
LOW…n_parser/resources/inline/ok/import_stmt_terminator.py1CODE
LOW…n_parser/resources/inline/ok/import_stmt_terminator.py1CODE
LOW…n_parser/resources/inline/ok/import_stmt_terminator.py2CODE
LOW…n_parser/resources/inline/ok/import_stmt_terminator.py2CODE
LOW…hon_parser/resources/inline/ok/valid_future_feature.py1CODE
LOW…er/resources/inline/ok/simple_stmts_with_semicolons.py1CODE
LOW…er/resources/inline/ok/simple_stmts_with_semicolons.py1CODE
LOW…hon_parser/resources/inline/ok/from_import_no_space.py1CODE
LOW…hon_parser/resources/inline/ok/from_import_no_space.py2CODE
LOW…thon_parser/resources/inline/ok/debug_rename_import.py1CODE
LOW…thon_parser/resources/inline/ok/debug_rename_import.py2CODE
LOW…thon_parser/resources/inline/ok/debug_rename_import.py3CODE
LOW…r/resources/inline/ok/dotted_name_normalized_spaces.py1CODE
LOW…r/resources/inline/ok/dotted_name_normalized_spaces.py2CODE
LOW…ser/resources/inline/ok/import_as_name_soft_keyword.py1CODE
LOW…ser/resources/inline/ok/import_as_name_soft_keyword.py2CODE
LOW…ser/resources/inline/ok/import_as_name_soft_keyword.py3CODE
LOW…ser/resources/inline/ok/import_as_name_soft_keyword.py4CODE
LOW…rces/inline/ok/from_import_soft_keyword_module_name.py1CODE
LOW…rces/inline/ok/from_import_soft_keyword_module_name.py2CODE
LOW…rces/inline/ok/from_import_soft_keyword_module_name.py3CODE
LOW…rces/inline/ok/from_import_soft_keyword_module_name.py4CODE
LOW…rces/inline/ok/from_import_soft_keyword_module_name.py5CODE
LOW…_python_parser/resources/inline/ok/import_from_star.py1CODE
LOW…ser/resources/inline/ok/from_import_stmt_terminator.py1CODE
LOW…ser/resources/inline/ok/from_import_stmt_terminator.py1CODE
LOW…ser/resources/inline/ok/from_import_stmt_terminator.py2CODE
LOW…ser/resources/inline/ok/from_import_stmt_terminator.py2CODE
LOW…ser/resources/inline/ok/from_import_stmt_terminator.py3CODE
LOW…ser/resources/inline/ok/from_import_stmt_terminator.py3CODE
LOW…ser/resources/inline/ok/from_import_stmt_terminator.py4CODE
LOW…ser/resources/inline/ok/from_import_stmt_terminator.py4CODE
LOW…rces/inline/ok/lazy_import_soft_keyword_split_py315.py3CODE
LOW…rces/inline/ok/lazy_import_soft_keyword_split_py315.py6CODE
LOW…hon_parser/resources/inline/err/debug_shadow_import.py1CODE
LOW…hon_parser/resources/inline/err/debug_shadow_import.py2CODE
LOW…hon_parser/resources/inline/err/debug_shadow_import.py3CODE
LOW…hon_parser/resources/inline/err/debug_shadow_import.py4CODE
LOW…_parser/resources/inline/err/invalid_future_feature.py1CODE
LOW…_parser/resources/inline/err/invalid_future_feature.py2CODE
79 more matches not shown…
Excessive Try-Catch Wrapping57 hits · 74 pts
SeverityFileLineSnippetContext
LOW…es/ruff_python_parser/resources/valid/statement/try.py15except Exception as e:CODE
LOW…esources/inline/ok/except_stmt_as_name_soft_keyword.py2except Exception as match: ...CODE
LOW…esources/inline/ok/except_stmt_as_name_soft_keyword.py3except Exception as case: ...CODE
LOW…esources/inline/ok/except_stmt_as_name_soft_keyword.py4except Exception as type: ...CODE
LOW…python_parser/resources/inline/err/debug_shadow_try.py2except Exception as __debug__: ...CODE
LOWcrates/ruff_python_formatter/src/comments/mod.rs729except Exception as ex:CODE
LOWcrates/ruff_python_formatter/src/comments/mod.rs756 except Exception as ex:CODE
MEDIUMcrates/ruff_python_formatter/src/comments/mod.rs751def test():CODE
LOW…es/ty_python_core/src/builder/loop_bindings_visitor.rs357 except Exception as exc_var:CODE
LOWcrates/ty_ide/src/semantic_tokens.rs4394except Exception as e:CODE
MEDIUMcrates/ty_ide/src/find_references.rs252 print(f'Error: {err}')CODE
MEDIUMcrates/ty_ide/src/find_references.rs268 5 | print(f'Error: {err}')CODE
LOWcrates/ruff_python_codegen/src/generator.rs1832except Exception as e:CODE
LOWcrates/ruff_benchmark/resources/numpy/ctypeslib.py305 except Exception as e:CODE
LOW…python_semantic/resources/corpus/62_try_except_cond.py3except Exception as exc:CODE
LOW…thon_semantic/resources/corpus/62_try_except_return.py4 except Exception as e:CODE
MEDIUM…thon_semantic/resources/corpus/62_try_except_return.py1def foo():CODE
LOW…ython_semantic/resources/mdtest/pep695_type_aliases.md177except Exception:CODE
LOW…resources/mdtest/diagnostics/semantic_syntax_errors.md556 except Exception:CODE
MEDIUM…resources/mdtest/diagnostics/semantic_syntax_errors.md553def i(a):CODE
LOW…thon_semantic/src/types/ide_support/unused_bindings.rs240 except Exception as dead_exc:CODE
MEDIUM…nter/resources/mdtest/ruff/fallible-context-manager.md137def bad_yield_in_finally_not_last():CODE
MEDIUM…nter/resources/mdtest/ruff/fallible-context-manager.md173def bad_yield_in_except_with_cleanup():CODE
MEDIUM…nter/resources/mdtest/ruff/fallible-context-manager.md191def bad_yield_in_else_with_cleanup():CODE
MEDIUM…nter/resources/mdtest/ruff/fallible-context-manager.md337def good_async_try_finally():CODE
MEDIUM…nter/resources/mdtest/ruff/fallible-context-manager.md355def good_nested_try_finally():CODE
MEDIUM…nter/resources/mdtest/ruff/fallible-context-manager.md385def good_try_except_with_else():CODE
MEDIUM…nter/resources/mdtest/ruff/fallible-context-manager.md395def good_yield_in_except_no_finally():CODE
MEDIUM…nter/resources/mdtest/ruff/fallible-context-manager.md403def good_yield_in_except_with_finally():CODE
MEDIUM…nter/resources/mdtest/ruff/fallible-context-manager.md413def good_yield_in_else_with_finally():CODE
MEDIUM…nter/resources/mdtest/ruff/fallible-context-manager.md425def good_yield_in_finally():CODE
LOW…nter/resources/mdtest/ruff/fallible-context-manager.md380 except Exception:CODE
LOW…nter/resources/mdtest/ruff/fallible-context-manager.md388 except Exception:CODE
LOW…nter/resources/mdtest/ruff/fallible-context-manager.md398 except Exception:CODE
LOW…nter/resources/mdtest/ruff/fallible-context-manager.md406 except Exception:CODE
LOW…nter/resources/mdtest/ruff/fallible-context-manager.md416 except Exception:CODE
LOW…nter/resources/mdtest/ruff/fallible-context-manager.md445 except Exception:CODE
LOW…nter/resources/mdtest/ruff/fallible-context-manager.md158 except Exception:CODE
LOW…nter/resources/mdtest/ruff/fallible-context-manager.md176 except Exception:CODE
LOW…nter/resources/mdtest/ruff/fallible-context-manager.md194 except Exception:CODE
LOW…nter/resources/mdtest/ruff/fallible-context-manager.md348 except Exception:CODE
LOWcrates/ruff_linter/src/rules/pylint/helpers.rs614 except Exception:CODE
LOWcrates/ruff_linter/src/rules/pylint/helpers.rs664 except Exception:CODE
MEDIUMcrates/ruff_linter/src/rules/pylint/helpers.rs611def f():CODE
MEDIUMcrates/ruff_linter/src/rules/pylint/helpers.rs625def f():CODE
LOW…r/src/rules/pylint/rules/too_many_return_statements.rs232except Exception:CODE
LOWcrates/ruff_linter/src/rules/flake8_tidy_imports/mod.rs280 except Exception:CODE
LOWcrates/ruff_linter/src/rules/flake8_tidy_imports/mod.rs306 except Exception:CODE
LOWcrates/ruff_linter/src/rules/pyflakes/mod.rs862 except Exception as x:CODE
LOWcrates/ruff_linter/src/rules/pyflakes/mod.rs912 except Exception as e:CODE
LOWcrates/ruff_linter/src/rules/pyflakes/mod.rs1145 except Exception as exc:CODE
LOWcrates/ruff_linter/src/rules/pyflakes/mod.rs1240 except Exception as len:CODE
LOWcrates/ruff_linter/src/rules/pyflakes/mod.rs1443 except Exception:CODE
LOWcrates/ruff_linter/src/rules/pyflakes/mod.rs1461 except Exception:CODE
LOWcrates/ruff_linter/src/rules/pyflakes/mod.rs1874 except Exception:CODE
LOWcrates/ruff_linter/src/rules/pyflakes/mod.rs2731 except Exception as fu: passCODE
MEDIUMcrates/ruff_linter/src/rules/pyflakes/mod.rs893def f():CODE
Decorative Section Separators25 hits · 70 pts
SeverityFileLineSnippetContext
MEDIUM…resources/valid/statement/ambiguous_lpar_with_items.py10# ------------------------COMMENT
MEDIUM…resources/valid/statement/ambiguous_lpar_with_items.py43# ------------------------COMMENT
MEDIUM…resources/valid/statement/ambiguous_lpar_with_items.py71# ----------------COMMENT
MEDIUM…resources/valid/statement/ambiguous_lpar_with_items.py99# ----------------------------------COMMENT
MEDIUM…es/ruff_annotate_snippets/src/renderer/display_list.rs556 // │ ┏━━━━━┛ │ │ < We are writing these linesCOMMENT
MEDIUM…es/ruff_annotate_snippets/src/renderer/display_list.rs557 // │ ┃┌───────┘ │ < by reverting the "depth" ofCOMMENT
MEDIUM…es/ruff_annotate_snippets/src/renderer/display_list.rs558 // │ ┃│┌─────────┘ < their multiline spans.COMMENT
MEDIUM…es/ruff_annotate_snippets/src/renderer/display_list.rs562 // │ ┃└─────│──┤COMMENT
MEDIUM…es/ruff_annotate_snippets/src/renderer/display_list.rs563 // │ ┗━━━━━━┥ `Y` is a good letter tooCOMMENT
MEDIUMcrates/ty_python_semantic/src/types/typevar.rs110/// # ╰─────╰─────────── [2]COMMENT
MEDIUMcrates/ty_python_semantic/src/types/typevar.rs110/// # ╰─────╰─────────── [2]COMMENT
MEDIUMcrates/ty_python_semantic/src/types/typevar.rs111/// # ╰─────────────────────── [1]COMMENT
MEDIUMcrates/ty_python_semantic/src/types/typevar.rs111/// # ╰─────────────────────── [1]COMMENT
MEDIUMcrates/ruff_python_ast/generate.py78# ------------------------------------------------------------------------------COMMENT
MEDIUMcrates/ruff_python_ast/generate.py89# ------------------------------------------------------------------------------COMMENT
MEDIUMcrates/ruff_python_ast/generate.py282# ------------------------------------------------------------------------------COMMENT
MEDIUMcrates/ruff_python_ast/generate.py296# ------------------------------------------------------------------------------STRING
MEDIUMcrates/ruff_python_ast/generate.py497# ------------------------------------------------------------------------------STRING
MEDIUMcrates/ruff_python_ast/generate.py590# ------------------------------------------------------------------------------STRING
MEDIUMcrates/ruff_python_ast/generate.py763# ------------------------------------------------------------------------------STRING
MEDIUMcrates/ruff_python_ast/generate.py990# ------------------------------------------------------------------------------STRING
MEDIUMcrates/ruff_python_ast/generate.py1035# ------------------------------------------------------------------------------STRING
MEDIUMcrates/ruff_python_ast/generate.py1083# ------------------------------------------------------------------------------STRING
MEDIUMcrates/ruff_python_ast/generate.py1152# ------------------------------------------------------------------------------STRING
MEDIUMcrates/ruff_python_ast/generate.py1174# ------------------------------------------------------------------------------STRING
Docstring Block Structure13 hits · 65 pts
SeverityFileLineSnippetContext
HIGH…/ruff_linter/src/rules/pydocstyle/rules/not_missing.rs312Calculate speed as distance divided by time. /// /// Args: /// distance: Distance traveled. /// timeSTRING
HIGH…tes/ruff_linter/src/rules/pydocstyle/rules/sections.rs46Calculate speed as distance divided by time. /// /// Args: /// distance: Distance traveled. /// STRING
HIGH…tes/ruff_linter/src/rules/pydocstyle/rules/sections.rs67Calculate speed as distance divided by time. /// /// Args: /// distance: Distance traveled. /// timeSTRING
HIGH…tes/ruff_linter/src/rules/pydocstyle/rules/sections.rs234Calculate speed as distance divided by time. /// /// args: /// distance: Distance traveled. /// timeSTRING
HIGH…tes/ruff_linter/src/rules/pydocstyle/rules/sections.rs255Calculate speed as distance divided by time. /// /// Args: /// distance: Distance traveled. /// timeSTRING
HIGH…tes/ruff_linter/src/rules/pydocstyle/rules/sections.rs320Calculate speed as distance divided by time. /// /// Parameters: /// ----------- /// distance : float /// STRING
HIGH…tes/ruff_linter/src/rules/pydocstyle/rules/sections.rs1131Calculate speed as distance divided by time. /// /// Args: /// distance: Distance traveled. /// timeSTRING
HIGH…tes/ruff_linter/src/rules/pydocstyle/rules/sections.rs1199Calculate speed as distance divided by time. /// /// Args: /// distance: Distance traveled. /// /// RetuSTRING
HIGH…tes/ruff_linter/src/rules/pydocstyle/rules/sections.rs1219Calculate speed as distance divided by time. /// /// Args: /// distance: Distance traveled. /// timeSTRING
HIGH…tes/ruff_linter/src/rules/pydocstyle/rules/sections.rs1284Calculate speed as distance divided by time. /// /// Args: /// /// distance: Distance traveled. /// STRING
HIGH…tes/ruff_linter/src/rules/pydocstyle/rules/sections.rs1306Calculate speed as distance divided by time. /// /// Args: /// distance: Distance traveled. /// timeSTRING
HIGH…ff_linter/src/rules/pydoclint/rules/check_docstring.rs354Calculate speed as distance divided by time. /// /// Args: /// distance: Distance traveled. /// timeSTRING
HIGH…ff_linter/src/rules/pydoclint/rules/check_docstring.rs410Calculate speed as distance divided by time. /// /// Args: /// distance: Distance traveled. /// timeSTRING
Cross-File Repetition13 hits · 65 pts
SeverityFileLineSnippetContext
HIGH…inter/src/rules/pycodestyle/rules/doc_line_too_long.rs0lorem ipsum dolor sit amet. lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.STRING
HIGH…ff_linter/src/rules/pycodestyle/rules/line_too_long.rs0lorem ipsum dolor sit amet. lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.STRING
HIGHdocs/linter.md0lorem ipsum dolor sit amet. lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.STRING
HIGH…/ruff_linter/src/rules/pydocstyle/rules/not_missing.rs0calculate speed as distance divided by time. /// /// args: /// /// distance: distance traveled. /// time: time spent traSTRING
HIGH…tes/ruff_linter/src/rules/pydocstyle/rules/sections.rs0calculate speed as distance divided by time. /// /// args: /// /// distance: distance traveled. /// time: time spent traSTRING
HIGH…ff_linter/src/rules/pydoclint/rules/check_docstring.rs0calculate speed as distance divided by time. /// /// args: /// /// distance: distance traveled. /// time: time spent traSTRING
HIGH…rules/pydocstyle/rules/newline_after_last_paragraph.rs0return a sorted copy of the list. /// /// sort the list in ascending order and return a copy of the result using the bubSTRING
HIGH…src/rules/pydocstyle/rules/multi_line_summary_start.rs0return a sorted copy of the list. /// /// sort the list in ascending order and return a copy of the result using the bubSTRING
HIGHcrates/ruff_linter/src/rules/pydocstyle/rules/indent.rs0return a sorted copy of the list. /// /// sort the list in ascending order and return a copy of the result using the bubSTRING
HIGH…nter/src/rules/pydocstyle/rules/blank_after_summary.rs0return a sorted copy of the list. /// /// sort the list in ascending order and return a copy of the result using the bubSTRING
HIGHpython/ruff-ecosystem/ruff_ecosystem/check.py0run the given ruff binary against the specified path.STRING
HIGHpython/ruff-ecosystem/ruff_ecosystem/format.py0run the given ruff binary against the specified path.STRING
HIGHscripts/check_ecosystem.py0run the given ruff binary against the specified path.STRING
Self-Referential Comments16 hits · 48 pts
SeverityFileLineSnippetContext
MEDIUM…resources/valid/statement/ambiguous_lpar_with_items.py6# The following sections basically separates between which node does theCOMMENT
MEDIUM…s/invalid/statements/with/ambiguous_lpar_with_items.py1# This file contains test cases where the with items has an ambiguous left parenthesis.COMMENT
MEDIUM…c/rules/flake8_bugbear/rules/loop_iterator_mutation.rs33/// # Create an infinite loop by appending to the list.COMMENT
MEDIUM…s/ruff_linter/src/rules/flake8_comprehensions/fixes.rs867 // # The above code will be converted to:COMMENT
MEDIUMcrates/ruff_python_ast/ast.toml1# This file is used by generate.py to autogenerate our Python AST data model.COMMENT
MEDIUMplayground/ruff/src/constants.ts4 "# Define a function that takes an integer n and returns the nth number in the Fibonacci\n" +CODE
MEDIUMscripts/update_schemastore.py76 # Create a new branch tagged with the current ruff commit up to date with the latestCOMMENT
MEDIUMscripts/add_plugin.py21 # Create the test fixture folder.COMMENT
MEDIUMscripts/add_plugin.py26 # Create the Plugin rules module.COMMENT
MEDIUMscripts/add_plugin.py61 # Create a subdirectory for rules and create a `mod.rs` placeholderCOMMENT
MEDIUMscripts/add_plugin.py67 # Create the snapshots subdirectoryCOMMENT
MEDIUMscripts/add_rule.py24 # Create a test fixture.COMMENT
MEDIUMscripts/ty_benchmark/src/benchmark/lsp_client.py16 # Define a union type that cattrs struggles with.COMMENT
MEDIUM.github/workflows/release.yml293 # Create a GitHub Release while uploading all files to itCOMMENT
MEDIUM.github/workflows/release.yml319 # Create a GitHub Release while uploading all files to itCOMMENT
MEDIUM.github/workflows/build-docker.yml231 # Initialize a variable to store all tag docker metadata patternsCOMMENT
Fake / Example Data30 hits · 46 pts
SeverityFileLineSnippetContext
LOWcrates/ty_ide/src/hover.rs5222 """Lorem ipsum dolor sit amet.<CURSOR>"""STRING
LOWcrates/ty_ide/src/hover.rs5222 """Lorem ipsum dolor sit amet.<CURSOR>"""STRING
LOW…ython_semantic/resources/mdtest/external/sqlalchemy.md28user = User(name="John Doe")CODE
LOW…/ty_python_semantic/resources/mdtest/external/attrs.md22user = User(id=1, name="John Doe")CODE
LOW…/ty_python_semantic/resources/mdtest/external/attrs.md38user = User(id=1, name="John Doe")CODE
LOW…_python_semantic/resources/mdtest/external/pydantic.md25user = User(id=1, name="John Doe")CODE
LOW…_python_semantic/resources/mdtest/external/sqlmodel.md21user = User(id=1, name="John Doe")CODE
LOW…_linter/src/rules/ruff/rules/invalid_pyproject_toml.rs25/// { name = "Ferris the Crab", email = "ferris@example.org" }COMMENT
LOW…inter/src/rules/pycodestyle/rules/doc_line_too_long.rs43/// """Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis auctor purus ut ex fermentum, at maximus est heCOMMENT
LOW…inter/src/rules/pycodestyle/rules/doc_line_too_long.rs43/// """Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis auctor purus ut ex fermentum, at maximus est heCOMMENT
LOW…inter/src/rules/pycodestyle/rules/doc_line_too_long.rs50/// Lorem ipsum dolor sit amet, consectetur adipiscing elit.COMMENT
LOW…inter/src/rules/pycodestyle/rules/doc_line_too_long.rs50/// Lorem ipsum dolor sit amet, consectetur adipiscing elit.COMMENT
LOW…inter/src/rules/pycodestyle/rules/doc_line_too_long.rs62/// """Lorem ipsum dolor sit amet.COMMENT
LOW…inter/src/rules/pycodestyle/rules/doc_line_too_long.rs62/// """Lorem ipsum dolor sit amet.COMMENT
LOW…inter/src/rules/pycodestyle/rules/doc_line_too_long.rs64/// Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.COMMENT
LOW…inter/src/rules/pycodestyle/rules/doc_line_too_long.rs64/// Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.COMMENT
LOW…ff_linter/src/rules/pycodestyle/rules/line_too_long.rs59/// """Lorem ipsum dolor sit amet.COMMENT
LOW…ff_linter/src/rules/pycodestyle/rules/line_too_long.rs59/// """Lorem ipsum dolor sit amet.COMMENT
LOW…ff_linter/src/rules/pycodestyle/rules/line_too_long.rs61/// Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.COMMENT
LOW…ff_linter/src/rules/pycodestyle/rules/line_too_long.rs61/// Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.COMMENT
LOWdocs/linter.md318"""Lorem ipsum dolor sit amet.STRING
LOWdocs/linter.md318"""Lorem ipsum dolor sit amet.STRING
LOWdocs/linter.md320Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.STRING
LOWdocs/linter.md320Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor.STRING
LOWdocs/linter.md412VALUE_1 = "Lorem ipsum dolor sit amet ..."CODE
LOWdocs/linter.md412VALUE_1 = "Lorem ipsum dolor sit amet ..."CODE
LOWdocs/linter.md413VALUE_2 = "Lorem ipsum dolor sit amet ..."CODE
LOWdocs/linter.md413VALUE_2 = "Lorem ipsum dolor sit amet ..."CODE
LOWdocs/linter.md414VALUE_3 = "Lorem ipsum dolor sit amet ..."CODE
LOWdocs/linter.md414VALUE_3 = "Lorem ipsum dolor sit amet ..."CODE
Verbosity Indicators33 hits · 46 pts
SeverityFileLineSnippetContext
LOWcrates/ty_python_semantic/src/types/member.rs85 // Otherwise, we need to check if the symbol has bindingsCOMMENT
LOWcrates/ty_python_semantic/src/types/constraints.rs4428 // the BDD. If we encounter one of those cases, we need to check if we can simplify thingsCOMMENT
LOWcrates/ty_python_semantic/src/types/class.rs2097 // Step 3: If the return type of the `__new__` evaluates to a type that is not a subclass of this class,COMMENT
LOWcrates/ty_python_semantic/src/types/call/bind.rs3237 // Step 1: Check the result of the arity check which is done by `match_parameters`COMMENT
LOWcrates/ty_python_semantic/src/types/call/bind.rs3287 // Step 2: Evaluate each remaining overload as a regular (non-overloaded) call to determineCOMMENT
LOWcrates/ty_python_semantic/src/types/call/bind.rs3359 // Step 3: Perform "argument type expansion". Reference:COMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1655 // Step 3: Clean-upCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1657 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2314 // Step 2: TraversalCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2317 // Step 3: Clean-upCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2327 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2334 // Step 1: Binding.COMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2341 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2346 // Step 1: Binding.COMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2356 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2361 // Step 1: BindingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2382 // Step 2: TraversalCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2385 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2390 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2393 // Step 2: TraversalCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs971 // Step 0: Pre-processingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1053 // Step 1: BindingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1247 // Step 2: TraversalCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1675 // Step 0: Pre-processingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1726 // Step 1: BindingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1761 // Step 2: TraversalCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2253 // Step 3: Clean-upCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2266 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2286 // Step 1: BindingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2411 // Step 1: BindingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2424 // Step 2: TraversalCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2558 // Step 4: AnalysisCOMMENT
LOW…_linter/src/rules/refurb/rules/isinstance_type_none.rs85 // the union operator, so we need to check if we're in a union.COMMENT
Structural Annotation Overuse30 hits · 42 pts
SeverityFileLineSnippetContext
LOWcrates/ty_python_semantic/src/types/class.rs2097 // Step 3: If the return type of the `__new__` evaluates to a type that is not a subclass of this class,COMMENT
LOWcrates/ty_python_semantic/src/types/call/bind.rs3237 // Step 1: Check the result of the arity check which is done by `match_parameters`COMMENT
LOWcrates/ty_python_semantic/src/types/call/bind.rs3287 // Step 2: Evaluate each remaining overload as a regular (non-overloaded) call to determineCOMMENT
LOWcrates/ty_python_semantic/src/types/call/bind.rs3359 // Step 3: Perform "argument type expansion". Reference:COMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1655 // Step 3: Clean-upCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1657 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2314 // Step 2: TraversalCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2317 // Step 3: Clean-upCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2327 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2334 // Step 1: Binding.COMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2341 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2346 // Step 1: Binding.COMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2356 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2361 // Step 1: BindingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2382 // Step 2: TraversalCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2385 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2390 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2393 // Step 2: TraversalCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs971 // Step 0: Pre-processingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1053 // Step 1: BindingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1247 // Step 2: TraversalCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1675 // Step 0: Pre-processingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1726 // Step 1: BindingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs1761 // Step 2: TraversalCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2253 // Step 3: Clean-upCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2266 // Step 4: AnalysisCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2286 // Step 1: BindingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2411 // Step 1: BindingCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2424 // Step 2: TraversalCOMMENT
LOWcrates/ruff_linter/src/checkers/ast/mod.rs2558 // Step 4: AnalysisCOMMENT
AI Slop Vocabulary11 hits · 32 pts
SeverityFileLineSnippetContext
MEDIUMcrates/ruff/src/commands/format.rs830 // a snippet to measure. If we commit to staying on our fork, a more robust way ofCOMMENT
MEDIUMcrates/ty_python_core/src/predicate.rs285/// will be visible from all control-flow paths or not. Essentially, we model `importer.py` asCOMMENT
MEDIUMcrates/ty_ide/src/docstring/markdown/general.rs9// Here lies a monument to robust parsing and escaping:COMMENT
LOWcrates/ruff_benchmark/resources/pydantic/types.py461 # hence we just use `secret_display`COMMENT
MEDIUMcrates/ty_python_semantic/src/types/special_form.rs306 /// This is much more robust than having a manual `from_string` method that matchesCOMMENT
MEDIUM…s/ty_python_semantic/src/types/class/static_literal.rs3264 // we want to be robust against new qualifiersCOMMENT
MEDIUM…rules/ruff/rules/access_annotations_from_class_dict.rs30/// robust (e.g., correctly handling the Python 3.14 behavior mentionedCOMMENT
MEDIUM…ff_linter/src/rules/flake8_pytest_style/rules/patch.rs20/// `return_value` is also robust to changes in the patched function'sCOMMENT
MEDIUM…e_annotations/rules/future_required_type_annotation.rs26/// does not impact your ability to leverage PEP 604-style unions (e.g., toCOMMENT
MEDIUM…annotations/rules/future_rewritable_type_annotation.rs31/// does not impact your ability to leverage PEP 604-style unions (e.g., toCOMMENT
MEDIUMcrates/ruff_python_semantic/src/model.rs972 // could actually be referred to. This is not as robust as back-trackingCOMMENT
Deep Nesting28 hits · 28 pts
SeverityFileLineSnippetContext
LOWcrates/ruff_benchmark/resources/typeis_narrowing.py210CODE
LOWcrates/ruff_benchmark/resources/tomllib/_parser.py69CODE
LOWcrates/ruff_benchmark/resources/numpy/ctypeslib.py235CODE
LOWcrates/ty_python_semantic/mdtest.py157CODE
LOWcrates/ty_python_semantic/mdtest.py231CODE
LOW…s/67_with_inside_try_finally_multiple_terminal_elif.py1CODE
LOWcrates/ruff_python_ast/generate.py300CODE
LOWcrates/ruff_python_ast/generate.py1039CODE
LOWcrates/ruff_python_ast/generate.py1087CODE
LOWpython/ruff-ecosystem/ruff_ecosystem/check.py344CODE
LOWpython/py-fuzzer/fuzz.py223CODE
LOWpython/py-fuzzer/fuzz.py326CODE
LOWscripts/add_plugin.py19CODE
LOWscripts/generate_mkdocs.py175CODE
LOWscripts/conformance.py448CODE
LOWscripts/conformance.py590CODE
LOWscripts/conformance.py674CODE
LOWscripts/conformance.py746CODE
LOWscripts/add_rule.py22CODE
LOWscripts/generate_builtin_modules.py55CODE
LOWscripts/setup-crates-io-publish.py276CODE
LOWscripts/check_ecosystem.py242CODE
LOWscripts/check_ecosystem.py299CODE
LOWscripts/check_ecosystem.py349CODE
LOWscripts/generate-crate-readmes.py79CODE
LOWscripts/ty_benchmark/src/benchmark/snapshot.py57CODE
LOWscripts/ty_benchmark/src/benchmark/lsp_client.py13CODE
LOWscripts/ty_benchmark/src/benchmark/lsp_client.py25CODE
Redundant / Tautological Comments14 hits · 26 pts
SeverityFileLineSnippetContext
LOW…style/rules/logical_lines/whitespace_before_comment.rs23/// x = x + 1 # Increment xCOMMENT
LOW…style/rules/logical_lines/whitespace_before_comment.rs28/// x = x + 1 # Increment xCOMMENT
LOW…style/rules/logical_lines/whitespace_before_comment.rs29/// x = x + 1 # Increment xCOMMENT
LOW…style/rules/logical_lines/whitespace_before_comment.rs58/// x = x + 1 #Increment xCOMMENT
LOW…style/rules/logical_lines/whitespace_before_comment.rs59/// x = x + 1 # Increment xCOMMENT
LOW…style/rules/logical_lines/whitespace_before_comment.rs65/// x = x + 1 # Increment xCOMMENT
LOW…style/rules/logical_lines/whitespace_before_comment.rs66/// x = x + 1 # Increment xCOMMENT
LOWscripts/update_schemastore.py111 # Check if the schema has changedCOMMENT
LOWscripts/check_ecosystem.py462 # Check if addition or removal depending on the first characterCOMMENT
LOWscripts/ty_benchmark/src/benchmark/snapshot.py91 # Check if snapshot exists.COMMENT
LOW.github/workflows/ci.yaml685 # Set pipefail to avoid hiding errors with teeCOMMENT
LOW.github/workflows/ci.yaml698 # Set pipefail to avoid hiding errors with teeCOMMENT
LOW.github/workflows/ci.yaml711 # Set pipefail to avoid hiding errors with teeCOMMENT
LOW.github/workflows/ci.yaml724 # Set pipefail to avoid hiding errors with teeCOMMENT
Cross-Language Confusion (JS/TS)3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHplayground/ty/src/Playground.tsx314 elif style == "bold":CODE
HIGHplayground/ty/src/Playground.tsx323print(with_style("ty is a fast type checker for Python.", "fast", "underlined"))CODE
HIGHplayground/ty/src/Editor/runPython.ts45 print(f"Runtime value is '{obj}'")CODE
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHdist-workspace.toml58# Whether CI should include auto-generated code to build local artifactsCOMMENT
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGH…on_eval/truth/auto-import-skips-current-module/main.py15# I've added it anyway in case it does in theCOMMENT
Modern Structural Boilerplate7 hits · 7 pts
SeverityFileLineSnippetContext
LOWcrates/ruff_benchmark/resources/numpy/globals.py22__all__ = ['_NoValue', '_CopyMode']CODE
LOWcrates/ruff_benchmark/resources/numpy/ctypeslib.py52__all__ = ['load_library', 'ndpointer', 'c_intp', 'as_ctypes', 'as_array',CODE
LOWcrates/ruff_benchmark/resources/pydantic/types.py33__all__ = [CODE
LOW…_semantic/resources/corpus/97_global_nonlocal_store.py4 def update_task_runs() -> None:CODE
LOWpython/ruff/__init__.py5__all__ = ["find_ruff_bin"]CODE
LOWscripts/setup-crates-io-publish.py229def set_trustpub_only(client: httpx.Client, crate_name: str, enabled: bool) -> None:CODE
LOWscripts/check_ecosystem.py34logger = logging.getLogger(__name__)CODE
Modern AI Meta-Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUM…semantic/resources/mdtest/generics/pep695/callables.md661## SymPy one-import MRE scaffold (multi-file)COMMENT
MEDIUM…semantic/resources/mdtest/generics/legacy/callables.md417## SymPy one-import MRE scaffold (multi-file)COMMENT
Example Usage Blocks4 hits · 6 pts
SeverityFileLineSnippetContext
LOWscripts/publish-crates.py8# Usage:COMMENT
LOWscripts/ecosystem_all_check.sh8# Usage:COMMENT
LOWscripts/setup-crates-io-publish.py16# Usage:COMMENT
LOWscripts/benchmarks/run_formatter.sh12# Example usage:COMMENT
TODO Padding3 hits · 5 pts
SeverityFileLineSnippetContext
LOWcrates/ruff_benchmark/resources/large/dataset.py1319# TODO: implement thisCOMMENT
LOW…ython_semantic/resources/mdtest/comparison/integers.md25# TODO: implement lookup of `__eq__` on typeshed `int` stub.COMMENT
LOWcrates/ty_python_semantic/src/types.rs6523 // TODO: Add tests for materialization once subtyping/assignability is implemented forCOMMENT
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUM…tes/ty_python_semantic/resources/corpus/93_deadcode.py3CODE
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWCargo.toml158# When updating salsa, make sure to also update the version in `fuzz/Cargo.toml`COMMENT
AI Structural Patterns1 hit · 0 pts
SeverityFileLineSnippetContext
LOWcrates/ruff_benchmark/resources/pydantic/types.py271CODE