File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,23 @@ class BTAG_PARTITION(BTAG_NO_BOUNDARY): # noqa: N801
117117
118118 .. versionadded:: 2017.1
119119 """
120- def __init__ (self , part_id : PartitionID ):
121- self .part_id = part_id
120+ def __init__ (self , part_id : PartitionID , part_nr = None ):
121+ if part_nr is not None :
122+ from warnings import warn
123+ warn ("part_nr is deprecated and will stop working in March 2023. "
124+ "Use part_id instead." ,
125+ DeprecationWarning , stacklevel = 2 )
126+ self .part_id = int (part_nr )
127+ else :
128+ self .part_id = part_id
129+
130+ @property
131+ def part_nr (self ):
132+ from warnings import warn
133+ warn ("part_nr is deprecated and will stop working in March 2023. "
134+ "Use part_id instead." ,
135+ DeprecationWarning , stacklevel = 2 )
136+ return self .part_id
122137
123138 def __hash__ (self ):
124139 return hash ((type (self ), self .part_id ))
You can’t perform that action at this time.
0 commit comments