Sample
pyint-ffc235d6710f-I10
Deterministically remove some optional blank lines and bracketed line breaks
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0.02 | 0–1; higher is more readable |
| Dorn | 0.777 | 0–1; higher is more readable |
| Mi | 0.431 | 0–1; higher is more readable |
| LLOC | 9 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 18 | 0–20; mean of three runs |
| BTTF | 0.603 | 0–1; higher is more readable |
Views
Loading feature diagnosis…
Source regions
Feature contributions
Feature contributions
| Feature | Value | Contribution (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 |
| 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.683 | −7.025 |
| Source linesThe number of non-empty source lines. | 17 | +6.8 |
Intercept 8.87 + feature contributions = -3.881 (log-odds).
Score = sigmoid(-3.881) = 0.02.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.043 | +0.525 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 18 | +0.399 |
| 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. | 78 | +0.361 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 12 | −0.322 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 65.056 | +0.245 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 16.797 | −0.175 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 12 | +0.145 |
Intercept 0.07 + feature contributions = 1.249 (log-odds).
Score = sigmoid(1.249) = 0.777.
| Score | 0.431 |
|---|
| Score | 9 |
|---|
Run 1
The code is highly readable. It has a clear logical structure with a single class inheriting from Django's Feed. Nesting is minimal—just two straightforward methods. Intent is explicitly documented in the docstring, explaining the purpose of adding geo-referenced information. The code is concise, with no unnecessary lines or redundancy. Action granularity is appropriate, with one logical operation per return statement. Reading flow is natural: class declaration, docstring, then two parallel methods that clearly extend feed generation. Minor deductions could be made for reliance on inherited methods like `_get_dynamic_attr`, which may not be immediately obvious to readers unfamiliar with Django's internals, but overall the code is exceptionally clear.
Run 2
The code is concise and well-structured. The class purpose is clearly explained in the docstring. Methods are short, with one action per line, and follow a consistent pattern. There is minimal nesting; only one level of indentation is used. Naming is clear, and the flow is natural: the class is defined, then feed-level extras, then item-level extras. The only minor drawbacks are the dependency on the `GeoRSSFeed` name (which is imported elsewhere or defined earlier) and the use of a private helper that may not be obvious to beginners, but both are understandable in context.
Run 3
The code is highly readable. It has a clear structure with an appropriate docstring explaining its purpose. Nesting is minimal, with flat method definitions. The intent is clear: extending Django's Feed to include geo-referenced geometry data. The code is concise, with no unnecessary lines. Each method performs a single, well-defined action. Reading flow is natural, following a logical top-to-bottom progression. Minor deductions: the missing import for GeoRSSFeed is a minor concern, and the docstring could be slightly more specific about how geometry is included. Overall, excellent readability.
Run 1
Code Structure: Imports, class documentation, configuration, and methods are logically organized. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The docstring and descriptive method names clearly explain geometry support, though GeoRSSFeed is not defined or imported in the snippet, and the docstring contains a minor grammatical error. Code length: Concise, with no unnecessary implementation detail. Action granularity: Each method performs a single return operation on one line. Reading flow: Natural top-to-bottom progression, with parallel methods reinforcing consistency. The unused Atom1Feed and Rss201rev2Feed imports introduce minor distraction.
Run 2
Code Structure: Imports, class documentation, configuration, and methods are logically organized. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: Descriptive method names and the docstring clearly explain how geometry is added to feeds, although GeoRSSFeed is neither defined nor imported in the snippet, and the docstring has a minor grammatical error. Code length: Compact and appropriately concise, though Atom1Feed and Rss201rev2Feed appear unused. Action granularity: Each statement performs one clear action. Reading flow: The progression from class purpose to feed-level and item-level geometry handling is natural, with consistent formatting and parallel method implementations.
Run 3
Code Structure: A well-organized subclass groups two closely related overrides. Nesting: The code is flat, with no conditional or loop nesting. Clarity of intent: Descriptive method names and the docstring explain how geometry is added to feeds, although GeoRSSFeed is not defined or imported in the snippet and the docstring has minor grammatical errors. Code length: The implementation is concise without unnecessary logic. Action granularity: Each method performs one clear action in a single return statement. Reading flow: Imports, class documentation, configuration, and methods follow a natural sequence; an additional blank line before the class would improve formatting.