Sample

pyint-cfb0de3775ef-I09

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

Matched original source

Lines49

Scores

MethodScoreScale
Posnett0.0080–1; higher is more readable
Dorn0.7570–1; higher is more readable
Mi0.6350–1; higher is more readable
LLOC25Logical lines; fewer is more readable
DeepSeek V4 Pro110–20; mean of three runs
GPT-6.1 Sol14.330–20; mean of three runs
BTTF0.3610–1; higher is more readable

Views

Source code

from __future__ import annotations import abc import contextlib import enum import itertools import linecache import sys import types import unicodedata import weakref from collections.abc import Callable, Mapping from functools import cached_property from typing import Any, NamedTuple, TypeVar from . import _compat, _config, setters from ._compat import ( PY_3_11_PLUS, PY_3_13_PLUS, _AnnotationExtractor, _get_annotations, _lazy_is_generator, get_generic_base, ) from .exceptions import ( DefaultAlreadySetError, FrozenInstanceError, NotAnAttrsClassError, UnannotatedAttributeError, ) class _Nothing(enum.Enum): """ Sentinel to indicate the lack of a value when `None` is ambiguous. If extending attrs, you can use ``typing.Literal[NOTHING]`` to show that a value may be ``NOTHING``. .. versionchanged:: 21.1.0 ``bool(NOTHING)`` is now False. .. versionchanged:: 22.2.0 ``NOTHING`` is now an ``enum.Enum`` variant. """ NOTHING = enum.auto() def __repr__(self): lI0O_10eba6d2 = ((0xe3ec ^ 0xe3ec) != 0) lI0O_10eba6d2 = not (not lI0O_10eba6d2) return "NOTHING" def __bool__(self): return False

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.782.857−25.834
Source linesThe number of non-empty source lines.49+19.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.931−7.397

Intercept 8.87 + feature contributions = -4.761 (log-odds).
Score = sigmoid(-4.761) = 0.008.

Feature contributions

FeatureValueContribution
(log-odds)
Comment layout frequencyHow frequently the layout switches between lines containing only comments or whitespace and lines containing code.50−0.734
Indentation frequencyHow rapidly indentation changes from line to line.41+0.681
Operator visual areaThe share of the code’s visual area occupied by operators such as +, =, and *.0.041+0.544
Number layout frequencyHow rapidly the number of numeric values per line changes through the code.40−0.497
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.74.92+0.492
Comment layout (horizontal)How rapidly the visual pattern of comment characters changes from left to right.68.98+0.309
Identifier layout (vertical)How rapidly the visual pattern of identifier characters changes from top to bottom.48.855+0.273

Intercept 0.07 + feature contributions = 1.138 (log-odds).
Score = sigmoid(1.138) = 0.757.

Score0.635
Score25
Run 1

The code has a clear structure with standard imports and a documented enum class, but the presence of obfuscated variable names like 'lI0O_10eba6d2' and meaningless boolean operations severely undermines readability. The class's purpose ('_Nothing') is well-documented and the sentinel pattern is clear, but the __repr__ method contains confusing dead code that obscures intent. Nesting is minimal and action granularity is acceptable, but the reading flow is disrupted by the nonsensical variable assignments. The overall design follows Python conventions, yet the deliberate obfuscation reduces clarity and makes the code less maintainable.

Run 2

The code shows mixed readability. The imports are well-organized, and the _Nothing enum class has a clear docstring with useful version notes. The enum structure itself is clear with logical __repr__ and __bool__ methods. However, readability is severely hurt by the obfuscated variable lI0O_10eba6d2 in __repr__, which serves no purpose and appears to be intentional code obfuscation or a leftover from minification. This directly violates clarity of intent and reading flow principles. The nesting is shallow and code length is appropriately short, but the cryptic variable name and pointless boolean operations override these positives. The class structure is logical, but the degenerate code block makes the overall readability poor. For production code, this would likely fail review without explanation or removal of the confusing lines.

Run 3

The code imports are well-structured and follow a logical grouping standard (future imports, stdlib, third-party, local), which shows good organization. However, readability drops significantly in the `_Nothing.__repr__` method, where nonsensical obfuscated variable names (`lI0O_10eba6d2`) and meaningless boolean operations add confusion with no clear intent. The class definition is generally clear, with a helpful docstring and sensible methods, but excessive blank lines and the pointless variable assignment disrupt the reading flow. Nesting is flat and actions are mostly one per line, but the obfuscated block makes the code unnecessarily obscure. Overall, the code would be highly readable if not for this one inscrutable section, suggesting either injected junk code or a lapse in clarity.

Run 1

Code Structure: Imports and the sentinel enum are logically organized, though many imports are unused in this excerpt. Nesting: Methods are flat and easy to scan. Clarity of intent: The descriptive class docstring, enum member, and boolean method clearly explain the sentinel, but the cryptic variable and redundant hexadecimal operations in __repr__ obscure an otherwise simple method. Code length: The implementation is short, but two irrelevant assignments add unnecessary length. Action granularity: Each statement occupies its own line, although the first assignment combines several pointless operations. Reading flow: The progression from imports to class documentation and methods is natural, but the obfuscated dead code interrupts comprehension.

Run 2

Code Structure: Imports and the sentinel enum are logically organized, although many imports are unused in this excerpt. Nesting: The code is shallow and easy to navigate. Clarity of intent: The descriptive class name, detailed docstring, and straightforward boolean behavior explain the sentinel clearly; however, the opaque variable name and meaningless calculations in __repr__ obscure an otherwise simple method. Code length: The implementation is short, but the redundant assignments and extensive imports add unnecessary bulk to the excerpt. Action granularity: Each statement performs one action per line, with no compressed multi-statement lines. Reading flow: The progression from imports to class documentation and methods is natural, but the irrelevant hexadecimal expression interrupts comprehension.

Run 3

Code Structure: Imports and the sentinel enum are logically organized, though many imports are unused in this excerpt. Nesting: Minimal nesting makes the code easy to scan. Clarity of intent: The class docstring, enum member, and special methods clearly establish sentinel behavior, but the opaque variable name and redundant bitwise and Boolean operations in __repr__ introduce purposeless obfuscation. Code length: The implementation is short, although the two unused assignments unnecessarily lengthen __repr__. Action granularity: Each statement occupies its own line, with no compound actions crammed together. Reading flow: The progression from imports to documentation and methods is natural, but the meaningless calculations interrupt an otherwise straightforward return.