File size: 4,894 Bytes
1600cd6
 
 
f4952b6
1600cd6
f4952b6
db2c7db
1600cd6
db2c7db
f4952b6
1600cd6
 
db2c7db
1600cd6
f4952b6
 
1600cd6
 
 
 
 
f4952b6
1600cd6
f4952b6
1600cd6
f4952b6
1600cd6
 
 
f4952b6
1600cd6
 
 
 
f4952b6
1600cd6
 
 
 
f4952b6
1600cd6
f4952b6
1600cd6
f4952b6
1600cd6
 
 
f4952b6
1600cd6
 
f4952b6
1600cd6
db2c7db
 
 
 
 
 
 
 
 
 
 
 
 
 
1600cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
db2c7db
 
 
 
f4952b6
db2c7db
 
f4952b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
db2c7db
 
 
f4952b6
db2c7db
 
f4952b6
 
 
 
 
 
 
 
 
 
 
 
 
 
db2c7db
 
1600cd6
 
 
f4952b6
1600cd6
f4952b6
1600cd6
f4952b6
1600cd6
 
 
f4952b6
1600cd6
 
f4952b6
1600cd6
db2c7db
 
 
f4952b6
db2c7db
f4952b6
db2c7db
f4952b6
db2c7db
 
 
f4952b6
db2c7db
 
f4952b6
db2c7db
1600cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f4952b6
1600cd6
 
f4952b6
db2c7db
1600cd6
db2c7db
f4952b6
1600cd6
 
db2c7db
1600cd6
f4952b6
 
1600cd6
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
{
  "denominator": "the counts below are over one fixture of this bundle, not over Python. They say how many of the functions this bundle planted are in a shape the catalog claims, so a reader can see that the catalog is a set of verified cards and not a claim about arbitrary code.",
  "fixture": "fixtures/pattern_lab",
  "module_level_functions": 33,
  "module_level_functions_by_file": {
    "src/asyncops.py": 10,
    "src/baskets.py": 2,
    "src/guards.py": 2,
    "src/labels.py": 2,
    "src/legacy.py": 2,
    "src/notes.py": 2,
    "src/registry.py": 6,
    "src/retries.py": 2,
    "src/slugify.py": 2,
    "src/tokens.py": 3,
    "src/widgets.py": 0
  },
  "patterns": [
    {
      "family": "typing",
      "min_assurance": 3,
      "negative_rows": 2,
      "pattern_id": "annotate-literal-defaults",
      "positive_rows": 2,
      "refusals_recorded": [
        "ALREADY_ANNOTATED",
        "ALREADY_ANNOTATED"
      ],
      "targets_in_shape": [
        "src/asyncops.py::render_page",
        "src/slugify.py::join_parts",
        "src/tokens.py::count_words",
        "src/tokens.py::summarize"
      ],
      "targets_planted_in_shape": 4
    },
    {
      "family": "contracts",
      "min_assurance": 3,
      "negative_rows": 2,
      "pattern_id": "bare-assert-to-explicit-raise",
      "positive_rows": 2,
      "refusals_recorded": [
        "NOT_THE_FIRST_STATEMENT",
        "NOT_THE_FIRST_STATEMENT"
      ],
      "targets_in_shape": [
        "src/asyncops.py::check_name",
        "src/guards.py::open_ticket"
      ],
      "targets_planted_in_shape": 2
    },
    {
      "family": "contracts",
      "min_assurance": 3,
      "negative_rows": 1,
      "pattern_id": "bare-except-to-narrow-exception",
      "positive_rows": 1,
      "refusals_recorded": [
        "NO_BARE_EXCEPT"
      ],
      "targets_in_shape": [
        "src/retries.py::call_or_none"
      ],
      "targets_planted_in_shape": 1
    },
    {
      "family": "shape",
      "min_assurance": 3,
      "negative_rows": 1,
      "pattern_id": "chain-to-registry",
      "positive_rows": 1,
      "refusals_recorded": [
        "BRANCH_SHAPE_MISMATCH"
      ],
      "targets_in_shape": [
        "src/registry.py::render"
      ],
      "targets_planted_in_shape": 1
    },
    {
      "family": "shape",
      "min_assurance": 3,
      "negative_rows": 1,
      "pattern_id": "drop-unused-imports",
      "positive_rows": 1,
      "refusals_recorded": [
        "NO_UNUSED_IMPORT"
      ],
      "targets_in_shape": [
        "src/legacy.py::read_size",
        "src/legacy.py::note_path"
      ],
      "targets_planted_in_shape": 2
    },
    {
      "family": "shape",
      "min_assurance": 3,
      "negative_rows": 2,
      "pattern_id": "empty-len-to-truthiness",
      "positive_rows": 2,
      "refusals_recorded": [
        "NO_EMPTY_LEN_CHECK",
        "NO_EMPTY_LEN_CHECK"
      ],
      "targets_in_shape": [
        "src/asyncops.py::word_total",
        "src/baskets.py::describe"
      ],
      "targets_planted_in_shape": 2
    },
    {
      "family": "contracts",
      "min_assurance": 3,
      "negative_rows": 1,
      "pattern_id": "init-missing-super",
      "positive_rows": 1,
      "refusals_recorded": [
        "SUPER_CALL_ALREADY_FIRST"
      ],
      "targets_in_shape": [
        "src/widgets.py::Box.__init__"
      ],
      "targets_planted_in_shape": 1
    },
    {
      "family": "mutation",
      "min_assurance": 3,
      "negative_rows": 2,
      "pattern_id": "mutable-default-to-none",
      "positive_rows": 2,
      "refusals_recorded": [
        "NOT_A_MUTABLE_DEFAULT",
        "NOT_A_MUTABLE_DEFAULT"
      ],
      "targets_in_shape": [
        "src/asyncops.py::gather",
        "src/slugify.py::add_tag"
      ],
      "targets_planted_in_shape": 2
    },
    {
      "family": "shape",
      "min_assurance": 3,
      "negative_rows": 2,
      "pattern_id": "none-comparison-to-identity",
      "positive_rows": 2,
      "refusals_recorded": [
        "NO_NONE_COMPARISON",
        "NO_NONE_COMPARISON"
      ],
      "targets_in_shape": [
        "src/asyncops.py::describe",
        "src/labels.py::label_for"
      ],
      "targets_planted_in_shape": 2
    },
    {
      "family": "resources",
      "min_assurance": 3,
      "negative_rows": 1,
      "pattern_id": "open-to-context-manager",
      "positive_rows": 1,
      "refusals_recorded": [
        "ALREADY_SCOPED"
      ],
      "targets_in_shape": [
        "src/notes.py::read_note"
      ],
      "targets_planted_in_shape": 1
    }
  ],
  "rows": 30,
  "schema": "lingologos-python-pattern-coverage-1",
  "source_files": [
    "src/asyncops.py",
    "src/baskets.py",
    "src/guards.py",
    "src/labels.py",
    "src/legacy.py",
    "src/notes.py",
    "src/registry.py",
    "src/retries.py",
    "src/slugify.py",
    "src/tokens.py",
    "src/widgets.py"
  ]
}