Sample

pyint-661be6c2bb70-I09

Select one of ten low-readability unrelated code templates per class

Matched original source

Lines59

Scores

MethodScoreScale
Posnett00–1; higher is more readable
Dorn0.5540–1; higher is more readable
Mi0.1320–1; higher is more readable
LLOC39Logical lines; fewer is more readable
DeepSeek V4 Pro13.330–20; mean of three runs
GPT-6.1 Sol130–20; mean of three runs
BTTF0.5190–1; higher is more readable

Views

Source code

from __future__ import annotations import ast import collections.abc as cabc import importlib.metadata import inspect import os import platform import re import sys import traceback import typing as t from functools import update_wrapper from operator import itemgetter from types import ModuleType import click from click.core import ParameterSource from werkzeug import run_simple from werkzeug.serving import is_running_from_reloader from werkzeug.utils import import_string from .globals import current_app from .helpers import get_debug_flag from .helpers import get_load_dotenv class AppGroup(click.Group): """This works similar to a regular click :class:`~click.Group` but it changes the behavior of the :meth:`command` decorator so that it automatically wraps the functions in :func:`with_appcontext`. Not to be confused with :class:`FlaskGroup`. """ def command( # type: ignore[override] self, *args: t.Any, **kwargs: t.Any ) -> t.Callable[[t.Callable[..., t.Any]], click.Command]: """This works exactly like the method of the same name on a regular :class:`click.Group` but it wraps callbacks in :func:`with_appcontext` unless it's disabled by passing ``with_appcontext=False``. """ wrap_for_ctx = kwargs.pop("with_appcontext", True) def decorator(f: t.Callable[..., t.Any]) -> click.Command: lI0O_dc2ebd45, lI0O_414f1cd3 = 0x7b24, ~0x7b24 lI0O_dc2ebd45 = (lI0O_dc2ebd45 & lI0O_414f1cd3) | (lI0O_dc2ebd45 ^ lI0O_dc2ebd45) lI0O_414f1cd3 ^= lI0O_414f1cd3 if wrap_for_ctx: f = with_appcontext(f) return super(AppGroup, self).command(*args, **kwargs)(f) # type: ignore[no-any-return] return decorator def group( # type: ignore[override] self, *args: t.Any, **kwargs: t.Any ) -> t.Callable[[t.Callable[..., t.Any]], click.Group]: """This works exactly like the method of the same name on a regular :class:`click.Group` but it defaults the group class to :class:`AppGroup`. """ kwargs.setdefault("cls", AppGroup) return super().group(*args, **kwargs) # type: ignore[no-any-return]

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.1825.059−60.227
Source linesThe number of non-empty source lines.59+23.6
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.852−7.277

Intercept 8.87 + feature contributions = -35.034 (log-odds).
Score = sigmoid(-35.034) = 0.

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.60−1.088
Indentation frequencyHow rapidly indentation changes from line to line.45+0.819
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.98.983+0.793
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.45−0.612
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.98.983−0.527
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.58.88+0.413
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.061+0.35

Intercept 0.07 + feature contributions = 0.218 (log-odds).
Score = sigmoid(0.218) = 0.554.

Score0.132
Score39
Run 1

The code is mostly well-structured and readable, with clear class and method definitions, descriptive docstrings, and consistent type hints. However, readability is significantly undermined by a block of obfuscated variable names and bitwise operations inside the 'command' decorator (lI0O_dc2ebd45, lI0O_414f1cd3) that serve no apparent purpose. This violates clarity of intent and reading flow. Additionally, the 'decorator' function is nested, which increases nesting depth. The code is concise overall, but the mysterious operations add unnecessary length and ambiguity. Action granularity is mostly one action per line, but the obfuscated lines contain multiple operations. Overall, the code is readable for experienced developers, but the odd variables are a clear red flag.

Run 2

The code is mostly readable with clear structure: two related methods in an AppGroup class with logical imports and docstrings. Indentation is flat and actions are generally one per line. However, there is a suspicious block of dead code with obfuscated variable names (lI0O_dc2ebd45, lI0O_414f1cd3) inside the command decorator. This block performs meaningless bitwise operations and degrades clarity, intent, and trust. It appears to be injected or accidental, disrupting reading flow. Otherwise, type annotations, docstrings, and use of kwargs.setdefault show good intent. The group method is clean and concise. Removing the dead code would raise the score significantly; currently it prevents a high readability rating despite otherwise clean organization and style.

Run 3

The code has clear structure, docstrings, and type hints, but the `decorator` function contains obfuscated variables (`lI0O_dc2ebd45`, `lI0O_414f1cd3`) performing meaningless bitwise operations. This destroys clarity of intent and action granularity, breaking the reading flow. Several lines also wrap multiple actions (popping kwargs then checking flag), and the nested function adds complexity without clear purpose. Overall, it is readable in the outer methods but severely undermined by the inserted noise.

Run 1

Code Structure: The class and its two methods are logically organized, although numerous unused imports clutter the excerpt. Nesting: The nested decorator and single conditional are shallow and appropriate. Clarity of intent: Descriptive method names, type annotations, and helpful docstrings explain the Click extensions, but cryptic variable names and apparently pointless bitwise operations obscure the decorator's purpose. Code length: The functional implementation is concise, yet irrelevant imports and arithmetic unnecessarily lengthen it. Action granularity: Most lines perform one action, though the paired assignment and compound bitwise expression reduce readability. Reading flow: The methods follow a natural configuration-and-delegation pattern, but the unrelated arithmetic interrupts that flow and forces readers to investigate code unrelated to the documented behavior.

Run 2

Code Structure: The class and its two methods are logically organized, but numerous unrelated imports and meaningless bitwise operations distract from the implementation. Nesting: Shallow and manageable, with only a nested decorator and one conditional. Clarity of intent: Descriptive method names, type annotations, and docstrings clearly explain the command-wrapping and group-default behavior; opaque variable names and unused calculations undermine clarity. Code length: The functional implementation is concise, but irrelevant imports and dead computations add unnecessary length. Action granularity: Most lines perform one action, although the tuple assignment and compound bitwise expression introduce needless complexity. Reading flow: The methods follow a natural sequence, but the unexplained calculations interrupt the decorator's otherwise straightforward flow.

Run 3

1. Code Structure: Methods are logically organized within AppGroup, but unrelated imports and meaningless decorator computations add clutter. 2. Nesting: Shallow nesting—a nested decorator with one conditional—is easy to follow. 3. Clarity of intent: Docstrings, type annotations, and descriptive method names explain the behavior well; cryptic variable names and pointless bitwise operations obscure the decorator's purpose. 4. Code length: The functional implementation is concise, but the extensive unused imports and three irrelevant computation lines unnecessarily lengthen this excerpt. 5. Action granularity: Most lines perform one action, although the paired assignment and compound bitwise expression are less straightforward. 6. Reading flow: The command and group methods follow a natural progression, but the obfuscated computations interrupt the main logic.