@@ -28,7 +28,6 @@ class AttributeField(Field):
2828 repr : bool
2929 default_factory : Optional [Callable [[], Attribute ]]
3030 type : types .TypeAttribute
31- property : bool
3231 pytype : bool = False
3332 "if `True`, annotation is a python type hint instead of `TypeAttribute`"
3433
@@ -45,7 +44,6 @@ def attribute(
4544 default_factory : Optional [Callable [[], Any ]] = None ,
4645 kw_only : bool = True ,
4746 alias : Optional [str ] = None ,
48- property : bool = False ,
4947) -> Any :
5048 if kw_only is False :
5149 raise TypeError ("attribute fields must be keyword-only" )
@@ -58,7 +56,6 @@ def attribute(
5856 default_factory = default_factory ,
5957 kw_only = kw_only ,
6058 alias = alias ,
61- property = property ,
6259 )
6360
6461
@@ -242,8 +239,6 @@ class StatementFields:
242239 """blocks of the statement."""
243240 attributes : dict [str , AttributeField ] = field (default_factory = dict )
244241 """attributes of the statement."""
245- properties : dict [str , AttributeField ] = field (default_factory = dict )
246- """properties of the statement."""
247242
248243 class Args :
249244 def __init__ (self , fields : "StatementFields" ):
@@ -299,7 +294,6 @@ def __contains__(self, name):
299294 or name in self .regions
300295 or name in self .blocks
301296 or name in self .attributes
302- or name in self .properties
303297 )
304298
305299 def __setitem__ (self , name , value ):
@@ -312,10 +306,7 @@ def __setitem__(self, name, value):
312306 elif isinstance (value , BlockField ):
313307 self .blocks [name ] = value
314308 elif isinstance (value , AttributeField ):
315- if value .property :
316- self .properties [name ] = value
317- else :
318- self .attributes [name ] = value
309+ self .attributes [name ] = value
319310 else :
320311 raise TypeError (f"unknown field type { value } " )
321312
@@ -326,7 +317,6 @@ def __iter__(self):
326317 yield from self .regions .values ()
327318 yield from self .blocks .values ()
328319 yield from self .attributes .values ()
329- yield from self .properties .values ()
330320
331321 def __len__ (self ):
332322 return (
@@ -335,20 +325,18 @@ def __len__(self):
335325 + len (self .regions )
336326 + len (self .blocks )
337327 + len (self .attributes )
338- + len (self .properties )
339328 )
340329
341330 @cached_property
342331 def attr_or_props (self ):
343- return set (list ( self .attributes .keys ()) + list ( self . properties . keys () ))
332+ return set (self .attributes .keys ())
344333
345334 @cached_property
346335 def required_names (self ):
347336 """set of all fields that do not have a default value."""
348337 return set (
349338 list (self .args .keys ())
350339 + [name for name , f in self .attributes .items () if f .has_no_default ()]
351- + [name for name , f in self .properties .items () if f .has_no_default ()]
352340 + [name for name , f in self .blocks .items () if f .has_no_default ()]
353341 + [name for name , f in self .regions .items () if f .has_no_default ()]
354342 )
0 commit comments