Sample

pyint-cd91f25dc045-SRC

Unmodified source class

Lines18

Scores

MethodScoreScale
Posnett0.030–1; higher is more readable
Dorn0.7780–1; higher is more readable
Mi0.430–1; higher is more readable
LLOC9Logical lines; fewer is more readable
DeepSeek V4 Pro180–20; mean of three runs
GPT-6.1 Sol180–20; mean of three runs
BTTF0.6010–1; higher is more readable

Views

Source code

from django.contrib.syndication.views import Feed as BaseFeed from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed class Feed(BaseFeed): """ This is a subclass of the `Feed` from `django.contrib.syndication`. This allows users to define a `geometry(obj)` and/or `item_geometry(item)` methods on their own subclasses so that geo-referenced information may placed in the feed. """ feed_type = GeoRSSFeed def feed_extra_kwargs(self, obj): return {"geometry": self._get_dynamic_attr("geometry", obj)} def item_extra_kwargs(self, item): return {"geometry": self._get_dynamic_attr("item_geometry", item)}

Loading feature diagnosis…

Source regions

Feature contributions

Feature contributions

FeatureValueContribution
(log-odds)
Halstead volumeHow much symbolic information the code contains. It combines the total number of operators and values with the number of distinct ones.379.567−12.526
Source linesThe number of non-empty source lines.18+7.2
Byte entropyHow varied the bytes in the source text are. Repeated bytes give a lower value; a more even mixture gives a higher value.4.684−7.026

Intercept 8.87 + feature contributions = -3.482 (log-odds).
Score = sigmoid(-3.482) = 0.03.

Feature contributions

FeatureValueContribution
(log-odds)
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.043+0.525
Identifier layout (horizontal)How rapidly the visual pattern of identifier characters changes from left to right. It measures spatial frequency, not the meaning of the names.77.947+0.364
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.19+0.364
Indentation frequencyHow rapidly indentation changes from line to line.13−0.287
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.65.737+0.256
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.17.797−0.161
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.13+0.123

Intercept 0.07 + feature contributions = 1.252 (log-odds).
Score = sigmoid(1.252) = 0.778.

Score0.43
Score9
Run 1

The code is highly readable. It has a clear class structure with descriptive docstring explaining its purpose. Nesting is flat with only one level of indentation under methods. Intent is obvious - extending Django's Feed to support geo-referencing. Code length is concise, with methods being single-line operations. Each method contains one clear action. Reading flow is natural: imports, class definition, docstring, then two similar methods that follow a consistent pattern. The only minor issue is the missing import of `GeoRSSFeed`, which slightly obscures where that class comes from. Variable and method names are descriptive, following Django conventions.

Run 2

The code is concise, well-structured, and easy to understand. It has a clear purpose: adding geo-referenced support to syndication feeds. Structure is logical—class definition, documented attributes, and two small methods. Nesting is flat, with no conditional or loop complexity. Intent is clearly communicated via the docstring and method names. Each method contains one logical action, contributing to high action granularity. Reading flow is natural: import, class, feed_type attribute, then methods in order of use. The only minor deduction is the slight dependency on external context for full understanding of `_get_dynamic_attr`, but this doesn't hinder clarity within the given scope.

Run 3

The code is highly readable with a clear, logical structure. It defines a subclass with a concise docstring explaining its purpose and customization points. The class has minimal, flat structure with no deep nesting. Each method performs a single action using a helper method, maintaining clear intent. Variable and method names are descriptive, and the code length is appropriate—neither too verbose nor too terse. The reading flow is natural, moving from class definition to method definitions. Minor deductions: the return values rely on an inherited helper method (`_get_dynamic_attr`), which may require some familiarity with Django's Feed internals, and the `feed_type = GeoRSSFeed` reference is not defined within this snippet, slightly affecting standalone clarity.

Run 1

Code Structure: The subclass is logically organized, with configuration followed by two related methods. Nesting: There is no unnecessary nesting. Clarity of intent: Descriptive method names and the docstring clearly explain how geometry is added to feeds, although GeoRSSFeed is not defined or imported in the snippet. Code length: The implementation is concise; the unused Atom1Feed and Rss201rev2Feed imports add minor clutter. Action granularity: Each method performs one focused action, with one return statement per line. Reading flow: The progression from imports to class documentation, configuration, and methods is natural. Minor grammatical issues in the docstring slightly reduce polish.

Run 2

Code Structure: A logically organized subclass groups two closely related overrides. Nesting: Methods are flat, with no conditional or loop nesting. Clarity of intent: Descriptive method names and the class docstring clearly explain adding geometry to feeds, though GeoRSSFeed is not defined or imported in the snippet, and the docstring contains a grammatical omission. Code length: Concise, with no unnecessary implementation, although Atom1Feed and Rss201rev2Feed are unused here. Action granularity: Each method performs one clearly expressed return action. Reading flow: Imports, documentation, configuration, and methods follow a natural sequence; an additional blank line before the class would improve conventional formatting.

Run 3

Code Structure: The class is logically organized, with a descriptive docstring, a configuration attribute, and two related methods. Nesting: The code is flat, with no conditional or loop nesting. Clarity of intent: Method names and the docstring clearly explain how geometry is added to feeds, although GeoRSSFeed is not defined or imported in the snippet and the docstring has minor grammatical issues. Code length: The implementation is concise without unnecessary logic; the docstring is slightly wordy. Action granularity: Each statement performs one clear action. Reading flow: The progression from imports to class documentation, configuration, and methods is natural. Unused Atom1Feed and Rss201rev2Feed imports introduce minor distraction.