Sample
pyint-8725f82ffcfc-SRC
Unmodified source class
Scores
| Method | Score | Scale |
|---|---|---|
| Posnett | 0 | 0–1; higher is more readable |
| Dorn | 0.586 | 0–1; higher is more readable |
| Mi | 0.349 | 0–1; higher is more readable |
| LLOC | 15 | Logical lines; fewer is more readable |
| DeepSeek V4 Pro | 17.67 | 0–20; mean of three runs |
| GPT-6.1 Sol | 19 | 0–20; mean of three runs |
| BTTF | 0.683 | 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. | 659.022 | −21.748 |
| Source linesThe number of non-empty source lines. | 20 | +8 |
| 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.59 | −6.885 |
Intercept 8.87 + feature contributions = -11.763 (log-odds).
Score = sigmoid(-11.763) = 0.
Feature contributions
| Feature | Value | Contribution (log-odds) |
|---|---|---|
| Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right. | 0 | −0.804 |
| Number layout frequencyHow rapidly the number of numeric values per line changes through the code. | 1 | +0.398 |
| Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *. | 0.058 | +0.376 |
| Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code. | 21 | +0.293 |
| 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. | 82 | +0.192 |
| Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom. | 19.783 | −0.133 |
| Indentation frequencyHow rapidly indentation changes from line to line. | 20 | −0.045 |
Intercept 0.07 + feature contributions = 0.346 (log-odds).
Score = sigmoid(0.346) = 0.586.
| Score | 0.349 |
|---|
| Score | 15 |
|---|
Run 1
The code is highly readable with clear structure and intent. It follows Django app config conventions, with logical imports grouped from standard Django modules. The class inherits from AppConfig and defines clear class attributes. The ready() method is flat with four distinct actions, each on its own line, showing excellent action granularity. The method names clearly communicate their purposes (inject_rename_contenttypes_operations, create_contenttypes, check_generic_foreign_keys, check_model_name_lengths). There are no nested blocks or conditionals. The only minor deductions are for the slightly long import statement spanning multiple lines, which requires a moment to parse, and the repeated checks.Tags.models registration pattern could potentially be abstracted, though the current approach is standard Django practice and maintains clarity.
Run 2
This Django app config code is highly readable. The imports are organized with stdlib/django grouping, using a multi-line import for related checks. The class structure is clear with descriptive attributes. The ready() method is flat, with one action per line, each connecting a signal or registering a check with clear function names. Variable names are self-documenting ('inject_rename_contenttypes_operations', 'create_contenttypes'). The code is concise—no unnecessary complexity or repetition. Reading flow is natural: imports, class definition, attributes, then method with sequential setup actions. Minor deduction only because a developer unfamiliar with Django signals/checks might need context, but for its domain this is exemplary.
Run 3
The code is highly readable. It follows a logical structure: imports from standard Django modules, then a single class with clear attributes and a concise ready() method. Nesting is flat—there are no nested conditionals or loops. Intent is clear: this AppConfig registers content type management hooks and system checks. Code length is minimal, with no unnecessary verbosity. Action granularity is appropriate, with one action per line inside ready(). Reading flow is natural: imports, class definition, configuration attributes, then registration statements. Minor deductions: the order of post_migrate and pre_migrate connections could be swapped to reflect temporal sequence, and a brief comment explaining the purpose of each connected receiver might aid future maintainers, but overall the code is clean and nearly ideal for its scope.
Run 1
Code Structure: Imports, configuration attributes, and initialization logic are logically organized. Nesting: Only the class and method levels are present, with no nested control flow. Clarity of intent: Descriptive names make signal connections and model-check registration clear, though understanding their effects requires Django familiarity. Code length: Compact, with no unnecessary logic or repetition. Action granularity: Each statement performs one distinct action. Reading flow: The code moves naturally from dependencies to configuration and startup behavior; an additional blank line before the class and separation of the relative import would slightly improve visual organization.
Run 2
Code Structure: Imports, application metadata, and startup registration are logically organized. Nesting: Only a class and its method are nested, keeping complexity low. Clarity of intent: Descriptive names make the configuration and signal/check registrations clear, though understanding ready() requires some Django knowledge. Code length: Concise, with no unnecessary logic or repetition. Action granularity: Each statement performs one clear assignment or registration. Reading flow: Natural progression from dependencies to configuration and initialization. Minor spacing improvements, such as separating the relative import and adding another blank line before the class, would improve visual organization.
Run 3
Code Structure: Imports, application metadata, and initialization logic are clearly organized. Nesting: Minimal nesting, limited to a class and its method. Clarity of intent: Descriptive names make signal connections and check registrations understandable, though Django lifecycle knowledge helps explain ready(). Code length: Compact with no unnecessary logic. Action granularity: Each statement performs one distinct configuration or registration action. Reading flow: Natural progression from dependencies to configuration and startup behavior. Minor spacing improvements between import groups and before the class would further improve readability.