AI Slop Code RIsk Monitor

python-attrs/attrs

Python Classes Without Boilerplate

12.8 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for python-attrs/attrs, a Python project with 5,852 GitHub stars. SynthScan examined 28,647 lines of code across 102 source files, recording 359 pattern matches distributed across 13 syntactic categories. The legacy adjusted pattern signal is 12.8 (Moderate 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.

12.8
Adjusted Signal
12.8
Raw Pattern Score
100%
Time Factor
2026-10-06
Last Push
5.9K
Stars
Python
Language
28.6K
Lines of Code
102
Files
359
Pattern Hits
2026-10-12
Scan Date
0.11
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 39.7/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 9.9/100 · LOW

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

Agent Over-Engineering Ratio 34.2/100 · MEDIUM

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

PR Review Velocity Impact 52.1/100 · HIGH

Which changes need focused human review? 359 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 0HIGH 11MEDIUM 4LOW 344

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 359 distinct pattern matches across 13 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 Identifiers249 hits · 216 pts
SeverityFileLineSnippetContext
LOWbench/test_benchmarks.py48def test_create_simple_class_make_class():CODE
LOWbench/test_benchmarks.py72def test_instantiate_no_defaults():CODE
LOWbench/test_benchmarks.py80def test_instantiate_with_defaults():CODE
LOWbench/test_benchmarks.py218 def test_create_cached_property_class(self):CODE
LOWtests/test_pyright.py89def test_pyright_attrsinstance_compat(tmp_path):CODE
LOWtests/test_pyright.py117def test_pyright_field_converters_tuple(tmp_path):CODE
LOWtests/test_funcs.py160 def test_lists_tuples_retain_type(self, container, C):CODE
LOWtests/test_funcs.py214 def test_asdict_preserve_order(self, cls):CODE
LOWtests/test_funcs.py223 def test_retain_keys_are_tuples(self):CODE
LOWtests/test_funcs.py254 def test_named_tuple_retain_type(self):CODE
LOWtests/test_funcs.py275 def test_type_error_with_retain_type(self):CODE
LOWtests/test_funcs.py332 def assert_proper_tuple_class(obj, obj_tuple):CODE
LOWtests/test_funcs.py413 def test_lists_tuples_retain_type(self, container, C):CODE
LOWtests/test_funcs.py460 def test_named_tuple_retain_type(self):CODE
LOWtests/test_funcs.py481 def test_type_error_with_retain_type(self):CODE
LOWtests/test_funcs.py773 def test_regression_attrs_classes(self):CODE
LOWtests/test_forward_references.py8def test_forward_class_reference():CODE
LOWtests/test_utils.py15 def test_returns_distinct_classes(self):CODE
LOWtests/test_converters.py95 def test_annotations_if_last_in_pipe(self):CODE
LOWtests/strategies.py52def _create_hyp_nested_strategy(draw, simple_class_strategy):CODE
LOWtests/strategies.py90def simple_attrs_with_metadata(draw):CODE
LOWtests/test_functional.py225 def test_subclassing_with_extra_attrs(self, cls):CODE
LOWtests/test_functional.py240 def test_subclass_without_extra_attrs(self, base):CODE
LOWtests/test_functional.py332 def test_subclassing_frozen_gives_frozen(self):CODE
LOWtests/test_functional.py420 def test_handles_different_defaults(self):CODE
LOWtests/test_functional.py437 def test_unsafe_hash_false_eq_false(self, slots):CODE
LOWtests/test_functional.py545 def test_tuple_class_aliasing(self):CODE
LOWtests/test_functional.py660 def test_no_setattr_if_validate_without_validators(self, slots):CODE
LOWtests/test_functional.py684 def test_no_setattr_if_convert_without_converters(self, slots):CODE
LOWtests/test_functional.py705 def test_no_setattr_with_ng_defaults(self, slots):CODE
LOWtests/test_functional.py733 def test_on_setattr_detect_inherited_validators(self):CODE
LOWtests/test_setattr.py51 def test_change_with_generator_hook(self):CODE
LOWtests/test_setattr.py71 def test_generator_hook_executes_after_yielding(self):CODE
LOWtests/test_setattr.py194 def test_generator_hook_not_called_in_init(self):CODE
LOWtests/test_setattr.py214 def test_generator_hook_with_define(self):CODE
LOWtests/test_setattr.py234 def test_generator_hook_class_level(self):CODE
LOWtests/test_setattr.py262 def test_generator_pre_yield_exception(self):CODE
LOWtests/test_setattr.py282 def test_generator_post_yield_exception(self):CODE
LOWtests/test_setattr.py303 def test_generator_yields_multiple_times(self):CODE
LOWtests/test_setattr.py344 def test_no_validator_no_converter(self):CODE
LOWtests/test_setattr.py359 def test_validate_respects_run_validators_config(self):CODE
LOWtests/test_setattr.py383 def test_frozen_on_setattr_class_is_caught(self):CODE
LOWtests/test_setattr.py395 def test_frozen_on_setattr_attribute_is_caught(self):CODE
LOWtests/test_setattr.py409 def test_frozen_on_setattr_nops(self, nop):CODE
LOWtests/test_setattr.py418 def test_setattr_reset_if_no_custom_setattr(self, slots):CODE
LOWtests/test_setattr.py443 def test_setattr_inherited_do_not_reset(self, slots):CODE
LOWtests/test_setattr.py470 def test_pickling_retains_attrs_own(self, slots):CODE
LOWtests/test_setattr.py487 def test_slotted_class_can_have_custom_setattr(self):CODE
LOWtests/test_setattr.py526 def test_setattr_auto_detect_if_no_custom_setattr(self, slots):CODE
LOWtests/test_setattr.py545 def test_setattr_restore_respects_auto_detect(self, slots):CODE
LOWtests/test_setattr.py558 def test_setattr_auto_detect_frozen(self, slots):CODE
LOWtests/test_setattr.py571 def test_setattr_auto_detect_on_setattr(self, slots):CODE
LOWtests/test_setattr.py591 def test_setattr_inherited_do_not_reset_intermediate(CODE
LOWtests/test_setattr.py633 def test_setattr_converter_piped(self):CODE
LOW⚡tests/test_make.py2654 def test_eq_callable_order_boolean(self):CODE
LOW⚡tests/test_make.py2663 def test_eq_callable_order_callable(self):CODE
LOW⚡tests/test_make.py2672 def test_eq_boolean_order_callable(self):CODE
LOW⚡tests/test_make.py2682 def test_order_mirrors_eq_by_default(self, eq):CODE
LOWtests/test_make.py67def _with_and_without_validation(request):CODE
LOWtests/test_make.py92 def test_validators_lists_to_wrapped_tuples(self):CODE
189 more matches not shown…
Unused Imports65 hits · 60 pts
SeverityFileLineSnippetContext
LOWbench/test_benchmarks.py5CODE
LOWtyping_tests/baseline.py8CODE
LOWtyping_tests/pyrefly.py7CODE
LOWtyping_tests/mypy.py7CODE
LOWtests/test_pyright.py3CODE
LOWtests/attr_import_star.py4CODE
LOWtests/test_import.py14CODE
LOWtests/test_hooks.py3CODE
LOWsrc/attrs/setters.py3CODE
LOWsrc/attrs/validators.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py3CODE
LOWsrc/attrs/__init__.py25CODE
LOWsrc/attrs/__init__.py26CODE
LOWsrc/attrs/__init__.py26CODE
LOWsrc/attrs/__init__.py26CODE
LOWsrc/attrs/__init__.py28CODE
LOWsrc/attrs/__init__.py28CODE
LOWsrc/attrs/__init__.py28CODE
LOWsrc/attrs/exceptions.py3CODE
LOWsrc/attrs/converters.py3CODE
LOWsrc/attrs/filters.py3CODE
LOWsrc/attr/__init__.py12CODE
LOWsrc/attr/__init__.py12CODE
LOWsrc/attr/__init__.py13CODE
LOWsrc/attr/__init__.py14CODE
LOWsrc/attr/__init__.py14CODE
LOWsrc/attr/__init__.py15CODE
LOWsrc/attr/__init__.py15CODE
LOWsrc/attr/__init__.py15CODE
LOWsrc/attr/__init__.py15CODE
LOWsrc/attr/__init__.py15CODE
LOWsrc/attr/__init__.py16CODE
LOWsrc/attr/__init__.py16CODE
LOWsrc/attr/__init__.py16CODE
LOWsrc/attr/__init__.py16CODE
LOWsrc/attr/__init__.py16CODE
LOWsrc/attr/__init__.py16CODE
LOWsrc/attr/__init__.py16CODE
LOWsrc/attr/__init__.py16CODE
LOWsrc/attr/__init__.py30CODE
LOWsrc/attr/__init__.py30CODE
LOWsrc/attr/__init__.py30CODE
5 more matches not shown…
Docstring Block Structure9 hits · 45 pts
SeverityFileLineSnippetContext
HIGHsrc/attr/_make.py590 Create a new instance, based on the first positional argument with *changes* applied. .. tip:: On STRING
HIGHsrc/attr/_make.py1925 Return the tuple of *attrs* attributes for a class or instance. The tuple also allows accessing the fields by STRING
HIGHsrc/attr/_make.py1976 Return an ordered dictionary of *attrs* attributes for a class, whose keys are the attribute names. Args: STRING
HIGHsrc/attr/_next_gen.py656 Inspect the class and return its effective build parameters. Warning: This feature is currently **expeSTRING
HIGHsrc/attr/_funcs.py34 Return the *attrs* attribute values of *inst* as a dict. Optionally recurse into other *attrs*-decorated classSTRING
HIGHsrc/attr/_funcs.py237 Return the *attrs* attribute values of *inst* as a tuple. Optionally recurse into other *attrs*-decorated clasSTRING
HIGHsrc/attr/_funcs.py353 Check whether *cls* is a class with *attrs* attributes. Args: cls (type): Class to introspect. RaSTRING
HIGHsrc/attr/_funcs.py381 Copy *inst* and apply *changes*. This is different from `evolve` that applies the changes to the arguments STRING
HIGHsrc/attr/_funcs.py428 Resolve any strings and forward annotations in type annotations. This is only required if you need concrete tySTRING
Deep Nesting14 hits · 14 pts
SeverityFileLineSnippetContext
LOWtests/test_funcs.py104CODE
LOWtests/test_funcs.py343CODE
LOWtests/test_funcs.py111CODE
LOWtests/test_funcs.py352CODE
LOWsrc/attr/_make.py381CODE
LOWsrc/attr/_make.py1353CODE
LOWsrc/attr/_make.py2187CODE
LOWsrc/attr/_make.py676CODE
LOWsrc/attr/_make.py823CODE
LOWsrc/attr/_make.py859CODE
LOWsrc/attr/_make.py1478CODE
LOWsrc/attr/_funcs.py26CODE
LOWsrc/attr/_funcs.py152CODE
LOWsrc/attr/_funcs.py230CODE
Empty Error Handlers2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHsrc/attr/validators.py669except self.exc_types:CODE
HIGHsrc/attr/_make.py996except ValueError: # noqa: PERF203CODE
AI Structural Patterns7 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/utils.py11CODE
LOWtests/utils.py40CODE
LOWsrc/attr/_make.py104CODE
LOWsrc/attr/_make.py1353CODE
LOWsrc/attr/_make.py2531CODE
LOWsrc/attr/_next_gen.py23CODE
LOWsrc/attr/_next_gen.py434CODE
Modern Structural Boilerplate5 hits · 5 pts
SeverityFileLineSnippetContext
LOWsrc/attrs/__init__.py31__all__ = [CODE
LOWsrc/attr/validators.py19__all__ = [CODE
LOWsrc/attr/__init__.py45__all__ = [CODE
LOWsrc/attr/converters.py11__all__ = [CODE
LOWsrc/attr/_config.py3__all__ = ["get_run_validators", "set_run_validators"]CODE
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/attr/_funcs.py494 # Return the class so you can use it as a decorator too.COMMENT
AI Slop Vocabulary2 hits · 2 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml273 "DTZ", # datetime best practices don't matter in testsSTRING
MEDIUMpyproject.toml285 "TRY", # exception best practices don't matter in testsSTRING
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtyping_tests/mypy.py161# ConvCPipe(3.4)COMMENT
LOWsrc/attr/_compat.py81COMMENT
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_setattr.py269CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/attr/_make.py708 # Check if the pre init method has more arguments than just `self`COMMENT
Excessive Try-Catch Wrapping1 hit · 0 pts
SeverityFileLineSnippetContext
LOWsrc/attr/validators.py731 except Exception: # noqa: BLE001, PERF203, S112STRING