AI Slop Code RIsk Monitor

dpkp/kafka-python

Python client for Apache Kafka

33.8 High pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for dpkp/kafka-python, a Python project with 5,905 GitHub stars. SynthScan examined 82,023 lines of code across 472 source files, recording 2220 pattern matches distributed across 16 syntactic categories. The legacy adjusted pattern signal is 33.8 (High 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.

33.8
Adjusted Signal
33.8
Raw Pattern Score
100%
Time Factor
2026-09-28
Last Push
5.9K
Stars
Python
Language
82.0K
Lines of Code
472
Files
2.2K
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 62.3/100 · HIGH

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

Hallucinated Dependency & Supply Chain Risk 13.7/100 · LOW

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

Agent Over-Engineering Ratio 74.0/100 · HIGH

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

PR Review Velocity Impact 82.1/100 · CRITICAL

Which changes need focused human review? 2220 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 55MEDIUM 163LOW 2002

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 2220 distinct pattern matches across 16 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 Identifiers1362 hits · 1276 pts
SeverityFileLineSnippetContext
LOWtest/test_metrics.py126def test_hierarchical_sensors(metrics):CODE
LOWtest/test_metrics.py162def test_bad_sensor_hierarchy(metrics):CODE
LOWtest/test_metrics.py217def test_remove_inactive_metrics(mocker, time_keeper, metrics):CODE
LOWtest/test_metrics.py317def test_old_data_has_no_effect(mocker, time_keeper):CODE
LOWtest/test_codec.py34def test_snappy_detect_xerial():CODE
LOWtest/test_codec.py56def test_snappy_decode_xerial():CODE
LOWtest/test_codec.py71def test_snappy_encode_xerial():CODE
LOW⚡test/test_serializer.py9def test_default_serializer_roundtrip(encoding):CODE
LOW⚡test/test_serializer.py18def test_default_serializer_passthrough_bytes_like(data):CODE
LOW⚡test/test_serializer.py22def test_default_serializer_deserialize_none():CODE
LOW⚡test/test_serializer.py26def test_default_serializer_rejects_non_bytes_str():CODE
LOW⚡test/test_serializer.py31def test_json_serializer_roundtrip():CODE
LOW⚡test/test_serializer.py39def test_json_serializer_none():CODE
LOW⚡test/test_serializer.py45def test_json_serializer_deserializes_plain_json():CODE
LOWtest/test_util.py21def test_topic_name_validation(topic_name, expectation):CODE
LOW⚡test/test_cluster.py268 def test_known_partition_returns_leader_and_epoch(self, cluster):CODE
LOW⚡test/test_cluster.py274 def test_unknown_topic_returns_none(self, cluster):CODE
LOW⚡test/test_cluster.py280 def test_unknown_partition_returns_none(self, cluster):CODE
LOW⚡test/test_cluster.py297 def test_updates_when_epoch_is_strictly_newer(self, cluster):CODE
LOW⚡test/test_cluster.py307 def test_noop_when_epoch_is_stale_or_equal(self, cluster):CODE
LOW⚡test/test_cluster.py316 def test_unknown_topic_or_partition_returns_false(self, cluster):CODE
LOW⚡test/test_cluster.py324 def test_rewires_broker_partitions(self, cluster):CODE
LOW⚡test/test_cluster.py332 def test_unknown_leader_id_minus_one_skips_broker_partitions_add(self, cluster):CODE
LOW⚡test/test_cluster.py401 def test_collect_hosts__with_spaces(self):CODE
LOW⚡test/test_cluster.py409 def test_collect_hosts__protocol(self):CODE
LOW⚡test/test_cluster.py419 def test_expands_multi_ip_host_to_canonical_names(self):CODE
LOW⚡test/test_cluster.py431 def test_deduplicates_canonical_names(self):CODE
LOW⚡test/test_cluster.py440 def test_falls_back_to_original_on_resolution_failure(self):CODE
LOW⚡test/test_cluster.py445 def test_missing_canonname_falls_back_to_input_host(self):CODE
LOW⚡test/test_cluster.py455 def test_default_does_not_expand_bootstrap(self):CODE
LOW⚡test/test_cluster.py462 def test_canonical_mode_expands_bootstrap(self):CODE
LOW⚡test/test_cluster.py477 def test_request_update_returns_future(self, cluster):CODE
LOW⚡test/test_cluster.py482 def test_request_update_deduplicates(self, cluster):CODE
LOW⚡test/test_cluster.py487 def test_request_update_new_future_after_done(self, cluster):CODE
LOW⚡test/test_cluster.py493 def test_request_update_sets_cluster_need_update(self, cluster):CODE
LOW⚡test/test_cluster.py497 def test_request_update_sends_metadata_request(self, manager, net):CODE
LOWtest/test_cluster.py131def _make_metadata_response_with_id(version, name, topic_id, partition=0,CODE
LOWtest/test_cluster.py179 def test_topic_id_unknown_returns_none(self, cluster):CODE
LOWtest/test_cluster.py202 def test_zero_uuid_not_indexed(self, cluster):CODE
LOWtest/test_cluster.py208 def test_recreation_resets_leader_epoch_and_updates_index(self, cluster, caplog):CODE
LOWtest/test_cluster.py225 def test_stable_id_keeps_leader_epoch(self, cluster):CODE
LOWtest/test_cluster.py232 def test_topic_drop_from_response_clears_index(self, cluster):CODE
LOWtest/test_cluster.py365 def test_collect_hosts__happy_path(self):CODE
LOWtest/test_cluster.py382 def test_collect_hosts__string_list(self):CODE
LOWtest/test_cluster.py509 def test_refresh_metadata_retries_no_node(self, manager, net):CODE
LOWtest/test_cluster.py521 def test_bootstrap_triggers_refresh_loop(self, manager, mocker):CODE
LOWtest/test_cluster.py531 def test_refresh_loop_spawned_once(self, manager):CODE
LOW⚡test/test_mock_broker.py57 def test_default_construction(self):CODE
LOW⚡test/test_mock_broker.py65 def test_set_metadata_with_topics(self):CODE
LOWtest/test_mock_broker.py80 def test_respond_queues_in_order(self):CODE
LOWtest/test_mock_broker.py92 def test_respond_fn_returning_none_sends_no_response(self):CODE
LOWtest/test_mock_broker.py134 def test_bootstrap_through_mock(self):CODE
LOWtest/test_mock_broker.py146 def test_metadata_with_topics(self):CODE
LOWtest/test_mock_broker.py219 def test_multiple_metadata_updates(self):CODE
LOWtest/test_mock_broker.py272 def test_fail_next_aborts_request(self):CODE
LOWtest/test_mock_broker.py296 def test_api_version_negotiation(self):CODE
LOWtest/test_mock_broker.py348 def test_admin_client_with_mock(self):CODE
LOWtest/test_mock_broker.py397 def test_default_construction(self):CODE
LOWtest/test_mock_broker.py407 def test_bootstrap_and_per_node_routing(self):CODE
LOWtest/test_mock_broker.py534 def test_add_group_elects_first_member_leader(self):CODE
1302 more matches not shown…
Decorative Section Separators140 hits · 538 pts
SeverityFileLineSnippetContext
MEDIUM⚡test/test_mock_broker.py48# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/test_mock_broker.py50# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/test_mock_broker.py115# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/test_mock_broker.py117# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/test_mock_broker.py380# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/test_mock_broker.py382# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/producer/test_transaction_manager_mock_broker.py54# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/producer/test_transaction_manager_mock_broker.py56# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/producer/test_transaction_manager_mock_broker.py1341# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/producer/test_transaction_manager_mock_broker.py1343# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py142# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py144# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py359# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py361# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py441# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py443# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py607# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py609# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py718# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py720# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py825# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py827# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py995# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py997# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py1216# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/producer/test_transaction_manager_mock_broker.py1218# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_users.py82# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_users.py84# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_groups.py53# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_groups.py55# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_groups.py168# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_groups.py170# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_groups.py278# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_groups.py280# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_groups.py442# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_groups.py444# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_groups.py734# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_groups.py736# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_groups.py860# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_groups.py862# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py529# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_groups.py531# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_transactions.py138# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_transactions.py140# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_transactions.py199# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_transactions.py201# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_transactions.py259# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_transactions.py261# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_transactions.py318# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_transactions.py320# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_transactions.py367# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_transactions.py369# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_topics.py161# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_topics.py163# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_topics.py238# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_topics.py240# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_topics.py96# ---------------------------------------------------------------------------COMMENT
MEDIUMtest/admin/test_admin_topics.py98# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_configs.py45# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡test/admin/test_admin_configs.py47# ---------------------------------------------------------------------------COMMENT
80 more matches not shown…
Empty Error Handlers53 hits · 265 pts
SeverityFileLineSnippetContext
HIGHexample.py60except Exception:CODE
HIGHtest/mock_broker.py360except RuntimeError:CODE
HIGHtest/producer/test_record_accumulator.py72except KeyError:CODE
HIGHtest/net/test_connection.py31except OSError:CODE
HIGHtest/net/backend/test_transport.py24except OSError:CODE
HIGHtest/net/backend/test_transport.py28except OSError:CODE
HIGHtest/integration/conftest.py127except Exception:CODE
HIGHtest/integration/conftest.py173except Exception:CODE
HIGHtest/integration/conftest.py219except Exception:CODE
HIGHtest/protocol/old/test_api.py27except ValueError:CODE
HIGHtest/consumer/test_coordinator.py114except Errors.IllegalStateError:CODE
HIGHtest/consumer/test_coordinator.py457except AssertionError:CODE
HIGHtest/consumer/test_coordinator.py543except AssertionError:CODE
HIGHkafka/util.py143except ValueError:CODE
HIGHkafka/cluster.py668except KeyError:CODE
HIGHkafka/cluster.py832except (ValueError, socket.error):CODE
HIGHkafka/producer/record_accumulator.py636except KeyError:CODE
HIGHkafka/producer/record_accumulator.py594except ValueError:CODE
HIGHkafka/producer/kafka.py755except AttributeError:CODE
HIGHkafka/producer/kafka.py759except AttributeError:CODE
HIGHkafka/producer/kafka.py679except (ReferenceError, AttributeError):CODE
HIGHkafka/coordinator/assignors/sticky/sticky_assignor.py49except (ValueError, KeyError):CODE
HIGHkafka/net/compat.py57except Errors.NodeNotReadyError:CODE
HIGHkafka/net/compat.py64except Errors.NodeNotReadyError:CODE
HIGHkafka/net/connection.py293except KeyError:CODE
HIGHkafka/net/manager.py363except KeyError:CODE
HIGHkafka/net/backend/abstract.py401except ImportError:CODE
HIGHkafka/net/backend/abstract.py399except sniffio.AsyncLibraryNotFoundError:CODE
HIGHkafka/net/backend/transport.py208except (KeyError, ValueError):CODE
HIGHkafka/net/backend/transport.py212except OSError:CODE
HIGHkafka/net/backend/transport.py161except OSError:CODE
HIGHkafka/net/backend/selector.py509except ValueError:CODE
HIGHkafka/net/backend/selector.py732except (KeyError, ValueError):CODE
HIGHkafka/net/backend/selector.py871except (BlockingIOError, OSError):CODE
HIGHkafka/net/backend/selector.py878except Exception:CODE
HIGHkafka/net/backend/selector.py882except Exception:CODE
HIGHkafka/net/backend/selector.py901except Exception:CODE
HIGHkafka/net/backend/selector.py905except Exception:CODE
HIGHkafka/net/backend/selector.py921except BlockingIOError:CODE
HIGHkafka/net/backend/asyncio_backend.py282except RuntimeError:CODE
HIGHkafka/net/backend/asyncio_backend.py437except (RuntimeError, AttributeError):CODE
HIGHkafka/net/backend/asyncio_backend.py443except (RuntimeError, AttributeError):CODE
HIGHkafka/net/backend/asyncio_backend.py168except RuntimeError:CODE
HIGHkafka/net/backend/asyncio_backend.py367except OSError:CODE
HIGHkafka/cli/common.py26except ValueError:CODE
HIGHkafka/cli/admin/partitions/list_offsets.py67except ValueError:CODE
HIGHkafka/benchmarks/producer_performance.py23except ValueError:CODE
HIGHkafka/benchmarks/protocol_old_vs_new.py435except Exception:CODE
HIGHkafka/benchmarks/consumer_performance.py23except ValueError:CODE
HIGHkafka/consumer/group.py637except AttributeError:CODE
HIGHkafka/consumer/group.py641except AttributeError:CODE
HIGHkafka/consumer/fetcher.py1402except KeyError:CODE
HIGHkafka/consumer/fetcher.py1691except KeyError:CODE
Unused Imports237 hits · 222 pts
SeverityFileLineSnippetContext
LOWtest/test_cluster.py5CODE
LOWtest/test_mock_broker.py15CODE
LOWtest/test_mock_broker.py17CODE
LOWtest/producer/test_producer.py1CODE
LOWtest/producer/test_producer.py2CODE
LOWtest/producer/test_transaction_manager_mock_broker.py19CODE
LOWtest/producer/test_transaction_manager_mock_broker.py30CODE
LOWtest/producer/test_transaction_manager_mock_broker.py31CODE
LOWtest/producer/test_sender.py4CODE
LOWtest/net/test_sasl_reauthentication.py6CODE
LOWtest/net/test_sasl_reauthentication.py179CODE
LOWtest/net/test_http_connect.py1CODE
LOWtest/net/test_http_connect.py3CODE
LOWtest/net/test_connection.py4CODE
LOWtest/net/test_ssl.py5CODE
LOWtest/net/test_ssl.py5CODE
LOWtest/net/test_ssl.py6CODE
LOWtest/net/test_compat.py2CODE
LOWtest/net/test_compat.py3CODE
LOWtest/net/test_proxy.py103CODE
LOWtest/net/backend/test_abstract.py14CODE
LOWtest/net/backend/test_transport.py2CODE
LOWtest/integration/test_admin_integration.py12CODE
LOWtest/integration/test_admin_integration.py12CODE
LOWtest/integration/test_admin_integration.py12CODE
LOWtest/integration/fixtures.py5CODE
LOWtest/integration/fixtures.py17CODE
LOWtest/admin/test_admin_topics.py6CODE
LOWtest/admin/test_admin_cluster_log_dirs.py1CODE
LOWtest/protocol/test_broker_version_data.py8CODE
LOWtest/protocol/test_stubs.py3CODE
LOWtest/protocol/test_stubs.py4CODE
LOWtest/protocol/test_stubs.py8CODE
LOWtest/protocol/test_stubs.py9CODE
LOWtest/protocol/test_api_compatibility.py2CODE
LOWtest/protocol/test_api_compatibility.py3CODE
LOWtest/protocol/test_api_compatibility.py5CODE
LOWtest/protocol/test_api_compatibility.py7CODE
LOWtest/protocol/old/test_compact.py4CODE
LOWtest/protocol/old/test_api.py3CODE
LOWtest/protocol/old/test_old_tagged_fields.py3CODE
LOWtest/protocol/old/test_types.py3CODE
LOWtest/protocol/old/test_old_fetch.py5CODE
LOWtest/protocol/old/test_old_api_versions.py5CODE
LOWtest/protocol/old/test_old_api_versions.py5CODE
LOWtest/protocol/old/test_old_api_versions.py7CODE
LOWtest/protocol/schemas/test_tagged_fields.py3CODE
LOWtest/protocol/schemas/test_codec_types.py7CODE
LOWtest/protocol/consumer/test_consumer_protocol.py3CODE
LOWtest/protocol/metadata/test_api_versions.py5CODE
LOWtest/consumer/test_coordinator.py20CODE
LOWtest/consumer/test_fetcher.py17CODE
LOWkafka/util.py1CODE
LOWkafka/__init__.py2CODE
LOWkafka/__init__.py13CODE
LOWkafka/__init__.py14CODE
LOWkafka/__init__.py15CODE
LOWkafka/__init__.py15CODE
LOWkafka/__init__.py18CODE
LOWkafka/__init__.py19CODE
177 more matches not shown…
Over-Commented Block172 hits · 170 pts
SeverityFileLineSnippetContext
LOW.readthedocs.yaml21 # builder: "dirhtml"COMMENT
LOWtest/mock_broker.py421 return NoneCOMMENT
LOWtest/protocol/test_api_compatibility.py21# ApiVersionsRequest_v3 (with a client_id for the header)COMMENT
LOWtest/protocol/test_api_compatibility.py41 b'\x00' \COMMENT
LOWtest/protocol/test_api_compatibility.py221 decoded_data = NewApiVersionsResponse[3].decode(COMMENT
LOWtest/protocol/test_api_compatibility.py241 # data: CompactArray of SupportedFeatureKeyCOMMENT
LOWdocs/conf.py1# -*- coding: utf-8 -*-COMMENT
LOWdocs/conf.py61# |version| and |release|, also used in various other places throughout theCOMMENT
LOWdocs/conf.py81# directories to ignore when looking for source files.COMMENT
LOWdocs/conf.py121COMMENT
LOWdocs/conf.py141# Add any paths that contain custom static files (such as style sheets) here,COMMENT
LOWdocs/conf.py161COMMENT
LOWdocs/conf.py181# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.COMMENT
LOWdocs/conf.py221# the title page.COMMENT
LOWkafka/errors.py1001 # not complete.COMMENT
LOWkafka/producer/sender.py281 # If we have any nodes that are ready to send + have sendable data,COMMENT
LOWkafka/coordinator/consumer.py401 try:COMMENT
LOWkafka/coordinator/assignors/cooperative_sticky.py141 # Build the round-1 assignment: drop any partition that'sCOMMENT
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py61 # a mapping between consumers and their assigned partitions that is updated during assignment procedureCOMMENT
LOW…ordinator/assignors/sticky/StickyAssignorUserData.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/net/wakeup_notifier.py21 """COMMENT
LOWkafka/net/backend/selector.py201 'selector': selectors.DefaultSelector,COMMENT
LOWkafka/record/memory_records.py1# This class takes advantage of the fact that all formats v0, v1 and v2 ofCOMMENT
LOWkafka/record/_crc32c.py1#!/usr/bin/env pythonCOMMENT
LOWkafka/record/legacy_records.py1# See:COMMENT
LOWkafka/record/legacy_records.py21# Value => bytesCOMMENT
LOWkafka/record/default_records.py1# See:COMMENT
LOWkafka/record/default_records.py21# ProducerEpoch => Int16COMMENT
LOWkafka/record/default_records.py41# the bytes that follow the CRC). It is located after the magic byte, whichCOMMENT
LOW…schemas/resources/DescribeTopicPartitionsResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…a/protocol/schemas/resources/DeleteRecordsRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/MetadataRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/MetadataRequest.json21 "validVersions": "0-13",COMMENT
LOWkafka/protocol/schemas/resources/HeartbeatResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/ProduceRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/ProduceRequest.json21 // Versions 0-2 were removed in Apache Kafka 4.0, version 3 is the new baseline. Due to a bug in librdkafka,COMMENT
LOW…ka/protocol/schemas/resources/DeleteGroupsRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…/schemas/resources/DescribeTopicPartitionsRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/EndTxnRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…otocol/schemas/resources/AlterClientQuotasRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…protocol/schemas/resources/DescribeGroupsResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…fka/protocol/schemas/resources/LeaveGroupResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…mas/resources/DescribeUserScramCredentialsRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…protocol/schemas/resources/FindCoordinatorRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…protocol/schemas/resources/FindCoordinatorRequest.json21 // Version 1 adds KeyType.COMMENT
LOW…tocol/schemas/resources/AddPartitionsToTxnRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…rotocol/schemas/resources/DescribeClusterResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…a/protocol/schemas/resources/SaslHandshakeRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…protocol/schemas/resources/DescribeLogDirsRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/FetchRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/FetchRequest.json21 // Versions 0-3 were removed in Apache Kafka 4.0, Version 4 is the new baseline.COMMENT
LOWkafka/protocol/schemas/resources/FetchRequest.json41 //COMMENT
LOW…ocol/schemas/resources/AlterReplicaLogDirsRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…as/resources/DescribeUserScramCredentialsResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…/protocol/schemas/resources/DescribeQuorumRequest.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOWkafka/protocol/schemas/resources/ResponseHeader.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…mas/resources/AlterPartitionReassignmentsResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…ka/protocol/schemas/resources/ApiVersionsResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
LOW…ka/protocol/schemas/resources/ApiVersionsResponse.json21 //COMMENT
LOW…otocol/schemas/resources/CreatePartitionsResponse.json1// Licensed to the Apache Software Foundation (ASF) under one or moreCOMMENT
112 more matches not shown…
Excessive Try-Catch Wrapping84 hits · 96 pts
SeverityFileLineSnippetContext
LOWexample.py60 except Exception:CODE
LOWtest/mock_broker.py503 except Exception:CODE
LOWtest/mock_broker.py710 except Exception:CODE
LOWtest/producer/test_partitioner.py232 except Exception as exc:CODE
MEDIUMtest/producer/test_partitioner.py227def hammer():CODE
MEDIUMtest/producer/test_sender.py898def get_in_thread():CODE
MEDIUMtest/producer/test_sender.py941def get_in_thread():CODE
LOWtest/producer/test_sender.py901 except Exception as e:CODE
LOWtest/producer/test_sender.py944 except Exception as e:CODE
LOWtest/net/test_manager.py434 except Exception:CODE
LOW⚡test/net/backend/test_asyncio_backend.py92 except Exception as exc: # noqa: BLE001CODE
LOWtest/integration/conftest.py127 except Exception:CODE
LOWtest/integration/conftest.py173 except Exception:CODE
LOWtest/integration/conftest.py219 except Exception:CODE
LOWtest/integration/conftest.py309 except Exception as e: # surfaced via spawn() / stop()CODE
MEDIUMtest/integration/conftest.py301def run(member=member, client_id=client_id):CODE
LOWkafka/cluster.py134 except Exception as exc:CODE
LOWkafka/cluster.py156 except Exception as exc:CODE
LOWkafka/cluster.py174 except Exception as exc:CODE
LOWkafka/future.py66 except Exception as e:CODE
LOWkafka/future.py89 except Exception as err:CODE
LOWkafka/future.py108 except Exception as e:CODE
LOWkafka/future.py127 except Exception as e:CODE
LOWkafka/future.py153 except Exception as e:CODE
LOWkafka/future.py160 except Exception as e:CODE
LOWkafka/producer/sender.py135 except Exception:CODE
LOWkafka/producer/sender.py150 except Exception:CODE
LOWkafka/producer/sender.py378 except Exception as e:CODE
MEDIUMkafka/producer/sender.py77def _maybe_remove_from_inflight_batches(self, batch):CODE
LOWkafka/producer/kafka.py748 except Exception:CODE
MEDIUMkafka/producer/kafka.py676def wrapper():CODE
LOWkafka/coordinator/consumer.py318 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py329 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py378 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py502 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py530 except Exception:CODE
LOWkafka/coordinator/consumer.py556 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py574 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py730 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py884 except Exception:CODE
LOWkafka/coordinator/consumer.py969 except Exception as exc:CODE
LOWkafka/coordinator/consumer.py1108 except Exception as exc:CODE
LOWkafka/coordinator/base.py841 except Exception as exc:CODE
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py626 except Exception:CODE
LOWkafka/net/proxy.py43 except Exception:CODE
LOWkafka/net/proxy.py111 except Exception as exc:CODE
LOWkafka/net/proxy.py126 except Exception as e:CODE
LOWkafka/net/proxy.py163 except Exception as exc:CODE
MEDIUMkafka/net/proxy.py157def _wrapped_state_machine(self):CODE
LOWkafka/net/connection.py278 except Exception:CODE
LOWkafka/net/connection.py370 except Exception as error:CODE
MEDIUMkafka/net/connection.py290def unpause(self, v):CODE
LOWkafka/net/manager.py173 except Exception as exc:CODE
LOWkafka/net/manager.py186 except Exception as exc:CODE
LOWkafka/net/manager.py263 except Exception as exc:CODE
MEDIUMkafka/net/manager.py245def _connect(self, node, conn, reset_backoff_on_connect=True, timeout_at=None):CODE
LOWkafka/net/backend/abstract.py311 except Exception:CODE
LOWkafka/net/backend/abstract.py330 except Exception:CODE
MEDIUMkafka/net/backend/selector.py401def waiter():CODE
LOW⚡kafka/net/backend/selector.py878 except Exception:CODE
24 more matches not shown…
Deep Nesting101 hits · 84 pts
SeverityFileLineSnippetContext
LOWtest/net/test_wakeup_notifier.py165CODE
LOWtest/net/backend/test_selector.py1089CODE
LOWtest/integration/conftest.py284CODE
LOWtest/integration/test_consumer_integration.py90CODE
LOWtest/integration/test_consumer_integration.py168CODE
LOWtest/integration/fixtures.py353CODE
LOWtest/consumer/test_assignors.py812CODE
LOWkafka/cluster.py521CODE
LOWkafka/future.py45CODE
LOWkafka/future.py72CODE
LOWkafka/metrics/metrics.py118CODE
LOWkafka/metrics/metrics.py158CODE
LOWkafka/metrics/stats/rate.py88CODE
LOWkafka/producer/sender.py91CODE
LOWkafka/producer/sender.py161CODE
LOWkafka/producer/sender.py316CODE
LOWkafka/producer/sender.py530CODE
LOWkafka/producer/record_accumulator.py113CODE
LOWkafka/producer/record_accumulator.py203CODE
LOWkafka/producer/record_accumulator.py324CODE
LOWkafka/producer/record_accumulator.py423CODE
LOWkafka/producer/kafka.py1056CODE
LOWkafka/producer/transaction_manager.py64CODE
LOWkafka/producer/transaction_manager.py852CODE
LOWkafka/producer/transaction_manager.py941CODE
LOWkafka/producer/transaction_manager.py996CODE
LOWkafka/producer/transaction_manager.py1093CODE
LOWkafka/producer/transaction_manager.py1133CODE
LOWkafka/producer/transaction_manager.py1176CODE
LOWkafka/producer/transaction_manager.py1263CODE
LOWkafka/coordinator/consumer.py264CODE
LOWkafka/coordinator/consumer.py389CODE
LOWkafka/coordinator/consumer.py486CODE
LOWkafka/coordinator/consumer.py659CODE
LOWkafka/coordinator/consumer.py844CODE
LOWkafka/coordinator/consumer.py974CODE
LOWkafka/coordinator/consumer.py1113CODE
LOWkafka/coordinator/base.py962CODE
LOWkafka/coordinator/base.py1134CODE
LOWkafka/coordinator/assignors/cooperative_sticky.py113CODE
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py176CODE
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py227CODE
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py281CODE
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py334CODE
LOWkafka/coordinator/assignors/sticky/sticky_assignor.py397CODE
LOWkafka/net/socks5.py28CODE
LOWkafka/net/connection.py290CODE
LOWkafka/net/connection.py376CODE
LOWkafka/net/backend/selector.py102CODE
LOWkafka/net/backend/selector.py517CODE
LOWkafka/net/backend/selector.py751CODE
LOWkafka/net/backend/selector.py767CODE
LOWkafka/net/backend/selector.py909CODE
LOWkafka/record/legacy_records.py188CODE
LOWkafka/record/legacy_records.py479CODE
LOWkafka/record/default_records.py111CODE
LOWkafka/record/default_records.py654CODE
LOWkafka/partitioner/sticky.py36CODE
LOWkafka/admin/_configs.py139CODE
LOWkafka/admin/_configs.py231CODE
41 more matches not shown…
Modern Structural Boilerplate33 hits · 33 pts
SeverityFileLineSnippetContext
LOWtest/service.py10__all__ = [CODE
LOWkafka/__init__.py27__all__ = [CODE
LOWkafka/metrics/metrics.py9logger = logging.getLogger(__name__)CODE
LOWkafka/metrics/__init__.py10__all__ = [CODE
LOWkafka/metrics/dict_reporter.py6logger = logging.getLogger(__name__)CODE
LOWkafka/metrics/stats/__init__.py12__all__ = [CODE
LOWkafka/producer/__init__.py3__all__ = [CODE
LOWkafka/net/__init__.py11__all__ = [CODE
LOWkafka/net/backend/abstract.py135 def set_protocol(self, protocol: 'NetProtocol') -> None: ...CODE
LOWkafka/record/__init__.py3__all__ = ["MemoryRecords", "MemoryRecordsBuilder"]CODE
LOWkafka/partitioner/__init__.py6__all__ = [CODE
LOWkafka/admin/__init__.py18__all__ = [CODE
LOWkafka/protocol/sasl.py48__all__ = [CODE
LOWkafka/protocol/producer/produce.py15__all__ = [CODE
LOWkafka/protocol/producer/transaction.py23__all__ = [CODE
LOWkafka/protocol/admin/configs.py17__all__ = [CODE
LOWkafka/protocol/admin/users.py11__all__ = [CODE
LOWkafka/protocol/admin/transactions.py14__all__ = [CODE
LOWkafka/protocol/admin/client_quotas.py11__all__ = [CODE
LOWkafka/protocol/admin/groups.py20__all__ = [CODE
LOWkafka/protocol/admin/acl.py77__all__ = [CODE
LOWkafka/protocol/admin/topics.py49__all__ = [CODE
LOWkafka/protocol/admin/cluster.py25__all__ = [CODE
LOWkafka/protocol/schemas/fields/__init__.py7__all__ = ["BaseField", "SimpleField", "StructField", "ArrayField", "StructArrayField"]CODE
LOWkafka/protocol/schemas/fields/codecs/__init__.py8__all__ = [CODE
LOWkafka/protocol/consumer/fetch.py14__all__ = [CODE
LOWkafka/protocol/consumer/metadata.py28__all__ = [CODE
LOWkafka/protocol/consumer/group.py29__all__ = [CODE
LOWkafka/protocol/consumer/offsets.py70__all__ = [CODE
LOWkafka/protocol/metadata/metadata.py32__all__ = [CODE
LOWkafka/protocol/metadata/api_versions.py39__all__ = [CODE
LOWkafka/protocol/metadata/find_coordinator.py17__all__ = [CODE
LOWkafka/consumer/__init__.py3__all__ = [CODE
AI Slop Vocabulary9 hits · 21 pts
SeverityFileLineSnippetContext
MEDIUM⚡test/producer/test_transaction_manager_mock_broker.py55# Test harnessCOMMENT
LOW⚡test/net/test_connection.py149 # Should not send any request -- just call _init_completeCOMMENT
LOW⚡test/consumer/test_fetcher.py557 # Don't actually block on the wakeup - just return as if the waitCOMMENT
LOWkafka/codec.py145 # buffer... likely a python-snappy bug, so just use a slice copyCOMMENT
MEDIUMkafka/net/manager.py100 # close(); a passed-in instance is left alone (so the unit-test harness,COMMENT
LOWkafka/net/sasl/gssapi.py67 # simply set QoP to 'auth' only (first octet). We reuse the max message size proposedCOMMENT
LOWkafka/net/sasl/gssapi.py82 # but instead we just set _is_authenticated. Since the plugin interface doesCOMMENT
LOWkafka/net/sasl/sspi.py92 # simply set QoP to 'auth' only (first octet). We reuse the max message size proposedCOMMENT
MEDIUMkafka/benchmarks/producer_performance.py55 # per-iteration harness overhead. With a well-optimizedCOMMENT
Cross-Language Confusion2 hits · 19 pts
SeverityFileLineSnippetContext
HIGH⚡kafka/coordinator/assignors/sticky/sticky_assignor.py340 # if minimum and maximum numbers of partitions assigned to consumers differ by at most one return trueCOMMENT
HIGHkafka/protocol/schemas/fields/struct.py75 # Nested nullable struct (KIP-893): 1-byte INT8 prefix, -1 = null,COMMENT
Self-Referential Comments6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMtest/__init__.py12 # Create a file handlerCOMMENT
MEDIUMtest/__init__.py16 # Create a formatter for the log messagesCOMMENT
MEDIUMtest/producer/test_record_accumulator.py133 # Create a retried batchCOMMENT
MEDIUMtest/producer/test_sender.py814 # Create a batch with large batch_size (simulating the original oversized batch)COMMENT
MEDIUMdocs/conf.py6# This file is execfile()d with the current directory set to itsCOMMENT
MEDIUMkafka/metrics/metrics.py65 # Creating a daemon thread to not block shutdownCOMMENT
Verbosity Indicators7 hits · 11 pts
SeverityFileLineSnippetContext
LOWtest/producer/test_transaction_manager_mock_broker.py322 # Step 1: enqueue the initial InitProducerIdHandler.COMMENT
LOWtest/producer/test_transaction_manager_mock_broker.py340 # Step 2: simulate the OUT_OF_ORDER_SEQUENCE_NUMBER recovery path.COMMENT
LOW⚡test/integration/fixtures.py156 # Step 1: Generate server keystoreCOMMENT
LOW⚡test/integration/fixtures.py162 # Step 2: Generate CA and truststoreCOMMENT
LOW⚡test/integration/fixtures.py170 # Step 3: Sign server cert with CACOMMENT
LOWkafka/net/connection.py430 # Step 1: SaslHandshake to negotiate mechanismCOMMENT
LOWkafka/net/connection.py445 # Step 2: SASL authentication exchangeCOMMENT
Structural Annotation Overuse7 hits · 11 pts
SeverityFileLineSnippetContext
LOWtest/producer/test_transaction_manager_mock_broker.py322 # Step 1: enqueue the initial InitProducerIdHandler.COMMENT
LOWtest/producer/test_transaction_manager_mock_broker.py340 # Step 2: simulate the OUT_OF_ORDER_SEQUENCE_NUMBER recovery path.COMMENT
LOW⚡test/integration/fixtures.py156 # Step 1: Generate server keystoreCOMMENT
LOW⚡test/integration/fixtures.py162 # Step 2: Generate CA and truststoreCOMMENT
LOW⚡test/integration/fixtures.py170 # Step 3: Sign server cert with CACOMMENT
LOWkafka/net/connection.py430 # Step 1: SaslHandshake to negotiate mechanismCOMMENT
LOWkafka/net/connection.py445 # Step 2: SASL authentication exchangeCOMMENT
AI Structural Patterns4 hits · 4 pts
SeverityFileLineSnippetContext
LOWtest/integration/fixtures.py353CODE
LOWtest/integration/fixtures.py386CODE
LOWtest/admin/test_admin_cluster_quorum.py7CODE
LOWkafka/record/default_records.py544CODE
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWkafka/record/legacy_records.py415 # Check if we have room for another messageCOMMENT
LOWkafka/record/default_records.py615 # Check if we can write this messageCOMMENT
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWtest/mock_broker.py385 async def handle_request(self, api_key, api_version, correlation_id, request_bytes):CODE