@@ -45,9 +45,8 @@ from __future__ import annotations
45
45
import abc
46
46
import collections
47
47
from collections .abc import Callable , Sequence
48
- import io
49
48
from pathlib import Path
50
- from typing import Any , BinaryIO , ClassVar , TypeVar , overload
49
+ from typing import Any , BinaryIO , ClassVar , Literal , TypeVar , overload
51
50
52
51
__all__ = [
53
52
"AffineAddExpr" ,
@@ -196,6 +195,19 @@ class _OperationBase:
196
195
Detaches the operation from its parent block.
197
196
"""
198
197
def erase (self ) -> None : ...
198
+
199
+ @overload
200
+ def get_asm (
201
+ binary : Literal [True ],
202
+ large_elements_limit : int | None = None ,
203
+ enable_debug_info : bool = False ,
204
+ pretty_debug_info : bool = False ,
205
+ print_generic_op_form : bool = False ,
206
+ use_local_scope : bool = False ,
207
+ assume_verified : bool = False ,
208
+ skip_regions : bool = False ,
209
+ ) -> bytes : ...
210
+ @overload
199
211
def get_asm (
200
212
self ,
201
213
binary : bool = False ,
@@ -206,19 +218,14 @@ class _OperationBase:
206
218
use_local_scope : bool = False ,
207
219
assume_verified : bool = False ,
208
220
skip_regions : bool = False ,
209
- ) -> io . BytesIO | io . StringIO :
221
+ ) -> str :
210
222
"""
211
- Gets the assembly form of the operation with all options available .
223
+ Returns the assembly form of the operation.
212
224
213
- Args:
214
- binary: Whether to return a bytes (True) or str (False) object. Defaults to
215
- False.
216
- ... others ...: See the print() method for common keyword arguments for
217
- configuring the printout.
218
- Returns:
219
- Either a bytes or str object, depending on the setting of the 'binary'
220
- argument.
225
+ See the print() method for common keyword arguments for configuring
226
+ the output.
221
227
"""
228
+
222
229
def move_after (self , other : _OperationBase ) -> None :
223
230
"""
224
231
Puts self immediately after the other operation in its parent block.
0 commit comments