Sample
pyint-ae68c3be27e6-I04
Replace names with deterministic minifier-style shortest identifiers
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.834 | 0–1; higher is more readable |
| Mi | 0.263 | 0–1; higher is more readable |
| LLOC | 18 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 13 | 0–20; mean of three runs |
| GPT-6.1 Sol | 16 | 0–20; mean of three runs |
| BTTF | 0.665 | 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. | 597.591 | −19.721 |
| Source linesThe number of non-empty source lines. | 23 | +9.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.604 | −6.906 |
Intercept 8.87 + feature contributions = -8.557 (log-odds).
Score = sigmoid(-8.557) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| 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. | 70.958 | +0.66 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.043 | +0.525 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 24 | +0.187 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 22.931 | −0.089 |
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 44.417 | −0.088 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 20 | −0.045 |
Intercept 0.07 + feature contributions = 1.616 (log-odds).
Score = sigmoid(1.616) = 0.834.
| Score | 0.263 |
|---|
| Score | 18 |
|---|
Run 1
The code has a clear basic structure and a descriptive docstring, but readability is hurt by poor naming (single-letter variables like 'a' and 'b'), which makes intent ambiguous. The use of `BaseEnvironment.__init__(self, **b)` instead of `super().__init__(**b)` is less idiomatic and harder to follow. While nesting is low and action granularity is reasonable, the abbreviated parameter names and the non-standard initialization call reduce clarity and natural reading flow. The conditional loader setup is simple but could be more explicit. Overall, the code functions but requires extra effort to interpret due to opaque naming and a slightly awkward initialization pattern.
Run 2
The code is well-structured and readable. It benefits from clear import organization, a concise docstring explaining the class's specialized behavior, and a straightforward constructor that modifies only the necessary option before delegating to the parent class. Nesting is minimal, with only one conditional block. The use of type hints and `t.Any` adds clarity. Action granularity is good, with one meaningful operation per line. Overall, it is idiomatic Python and Jinja extension code, though the abstract context and incomplete `App` type hint prevent a perfect score.
Run 3
The code is generally readable and follows standard Python patterns. It has a clear structure with logical imports and a single class definition. Nesting is minimal, with only one conditional in the constructor. The intent is clear: extending Jinja's Environment for Flask blueprint awareness. However, readability is reduced by non-descriptive parameter names ('a', 'b'), which obscure intent and require reader inference. The class docstring is helpful but refers to Flask specifics without context. Action granularity is good, with one main action per line. The reading flow is natural, but the use of 'a' and 'b' disrupts clarity. Concise length and proper typing annotations are positive aspects.
Run 1
Code Structure: Imports and a single class are logically organized, though several imports are unused in this snippet and the class could use additional spacing. Nesting: Only one shallow conditional, making execution easy to follow. Clarity of intent: Inheritance, type annotations, and the loader setup communicate the purpose, but parameter names 'a' and 'b' are vague. The docstring describes blueprint behavior rather than directly explaining the constructor's loader configuration, and 'App' is not imported in the snippet. Code length: Compact without unnecessary implementation detail. Action granularity: Each statement performs one clear action. Reading flow: The constructor naturally progresses from configuring a default loader to initializing the base environment and storing the application, with cryptic parameter names providing the main distraction.
Run 2
Code Structure: Imports, class definition, and constructor are logically organized, although several imports are unused in this snippet. Nesting: Only one shallow conditional keeps the code easy to follow. Clarity of intent: The class name, docstring, and loader creation convey the purpose, but parameter names 'a' and 'b' obscure their roles; 'app' and 'options' would be clearer. The App annotation is not defined or imported here, and the docstring describes behavior not directly shown. Code length: The implementation is concise, though unused imports add clutter. Action granularity: Each statement performs one action. Reading flow: Execution proceeds naturally from providing a default loader to initializing the base environment and storing the application, but missing blank lines between import groups and before the class slightly reduce readability.
Run 3
Code Structure: Imports and a single class with a short initializer are logically organized. Nesting: Only one shallow conditional makes the control flow easy to follow. Clarity of intent: The superclass, docstring, and loader setup communicate the broad purpose, but parameter names 'a' and 'b' obscure their roles. The docstring describes blueprint behavior not directly visible here, and 'App' is not imported in the snippet. Code length: The implementation is concise, although several imports are unused in the shown code. Action granularity: Each statement performs one action, with no compressed multi-action lines. Reading flow: The initializer naturally progresses from choosing a default loader to initializing the environment and storing the application. Missing blank lines between import groups and before the class slightly weaken visual organization.