@@ -172,13 +172,13 @@ export class AnnotatedPythonPackageBuilder {
172
172
switch ( annotationType ) {
173
173
case 'Attribute' :
174
174
const attributeAnnotation = this . annotationStore . attributes [ target ] ;
175
- if ( attributeAnnotation ) {
175
+ if ( attributeAnnotation && ! attributeAnnotation . isRemoved ) {
176
176
return new InferableAttributeAnnotation ( attributeAnnotation ) ;
177
177
}
178
178
break ;
179
179
case 'Boundary' :
180
180
const boundaryAnnotation = this . annotationStore . boundaries [ target ] ;
181
- if ( boundaryAnnotation ) {
181
+ if ( boundaryAnnotation && ! boundaryAnnotation . isRemoved ) {
182
182
return new InferableBoundaryAnnotation ( boundaryAnnotation ) ;
183
183
}
184
184
break ;
@@ -187,18 +187,18 @@ export class AnnotatedPythonPackageBuilder {
187
187
if ( ! calledAfterAnnotations ) {
188
188
break ;
189
189
}
190
- return Object . values ( calledAfterAnnotations ) . map (
191
- ( calledAfterAnnotation ) => new InferableCalledAfterAnnotation ( calledAfterAnnotation ) ,
192
- ) ;
190
+ return Object . values ( calledAfterAnnotations )
191
+ . filter ( ( it ) => ! it . isRemoved )
192
+ . map ( ( calledAfterAnnotation ) => new InferableCalledAfterAnnotation ( calledAfterAnnotation ) ) ;
193
193
case 'Constant' :
194
194
const constantAnnotation = this . annotationStore . constants [ target ] ;
195
- if ( constantAnnotation ) {
195
+ if ( constantAnnotation && ! constantAnnotation . isRemoved ) {
196
196
return new InferableConstantAnnotation ( constantAnnotation ) ;
197
197
}
198
198
break ;
199
199
case 'Description' :
200
200
const descriptionAnnotation = this . annotationStore . descriptions [ target ] ;
201
- if ( descriptionAnnotation ) {
201
+ if ( descriptionAnnotation && ! descriptionAnnotation . isRemoved ) {
202
202
return new InferableDescriptionAnnotation ( descriptionAnnotation ) ;
203
203
}
204
204
break ;
@@ -207,54 +207,54 @@ export class AnnotatedPythonPackageBuilder {
207
207
if ( ! groupAnnotations ) {
208
208
break ;
209
209
}
210
- return Object . values ( groupAnnotations ) . map (
211
- ( groupAnnotation ) => new InferableGroupAnnotation ( groupAnnotation ) ,
212
- ) ;
210
+ return Object . values ( groupAnnotations )
211
+ . filter ( ( it ) => ! it . isRemoved )
212
+ . map ( ( groupAnnotation ) => new InferableGroupAnnotation ( groupAnnotation ) ) ;
213
213
case 'Enum' :
214
214
const enumAnnotation = this . annotationStore . enums [ target ] ;
215
- if ( enumAnnotation ) {
215
+ if ( enumAnnotation && ! enumAnnotation . isRemoved ) {
216
216
return new InferableEnumAnnotation ( enumAnnotation ) ;
217
217
}
218
218
break ;
219
219
case 'Move' :
220
220
const moveAnnotation = this . annotationStore . moves [ target ] ;
221
- if ( moveAnnotation ) {
221
+ if ( moveAnnotation && ! moveAnnotation . isRemoved ) {
222
222
return new InferableMoveAnnotation ( moveAnnotation ) ;
223
223
}
224
224
break ;
225
225
case 'Optional' :
226
226
const optionalAnnotation = this . annotationStore . optionals [ target ] ;
227
- if ( optionalAnnotation ) {
227
+ if ( optionalAnnotation && ! optionalAnnotation . isRemoved ) {
228
228
return new InferableOptionalAnnotation ( optionalAnnotation ) ;
229
229
}
230
230
break ;
231
231
case 'Pure' :
232
232
const pureAnnotation = this . annotationStore . pures [ target ] ;
233
- if ( pureAnnotation ) {
233
+ if ( pureAnnotation && ! pureAnnotation . isRemoved ) {
234
234
return new InferablePureAnnotation ( ) ;
235
235
}
236
236
break ;
237
237
case 'Remove' :
238
238
const removeAnnotation = this . annotationStore . removes [ target ] ;
239
- if ( removeAnnotation ) {
239
+ if ( removeAnnotation && ! removeAnnotation . isRemoved ) {
240
240
return new InferableRemoveAnnotation ( ) ;
241
241
}
242
242
break ;
243
243
case 'Rename' :
244
244
const renameAnnotation = this . annotationStore . renamings [ target ] ;
245
- if ( renameAnnotation ) {
245
+ if ( renameAnnotation && ! renameAnnotation . isRemoved ) {
246
246
return new InferableRenameAnnotation ( renameAnnotation ) ;
247
247
}
248
248
break ;
249
249
case 'Required' :
250
250
const requiredAnnotation = this . annotationStore . requireds [ target ] ;
251
- if ( requiredAnnotation ) {
251
+ if ( requiredAnnotation && ! requiredAnnotation . isRemoved ) {
252
252
return new InferableRequiredAnnotation ( ) ;
253
253
}
254
254
break ;
255
255
case 'Todo' :
256
256
const todoAnnotation = this . annotationStore . todos [ target ] ;
257
- if ( todoAnnotation ) {
257
+ if ( todoAnnotation && ! todoAnnotation . isRemoved ) {
258
258
return new InferableTodoAnnotation ( todoAnnotation ) ;
259
259
}
260
260
break ;
0 commit comments