Skip to content

Commit f72b1c0

Browse files
committed
fix linter
1 parent db42da1 commit f72b1c0

File tree

1 file changed

+13
-21
lines changed

1 file changed

+13
-21
lines changed

cuda_core/cuda/core/experimental/_module.py

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,7 @@ def __new__(self, *args, **kwargs):
459459
)
460460

461461
@classmethod
462-
def _init(cls, module, code_type, *,
463-
name: str = "",
464-
symbol_mapping: Optional[dict] = None):
462+
def _init(cls, module, code_type, *, name: str = "", symbol_mapping: Optional[dict] = None):
465463
self = super().__new__(cls)
466464
assert code_type in self._supported_code_type, f"{code_type=} is not supported"
467465
_lazy_init()
@@ -488,9 +486,7 @@ def __reduce__(self):
488486
return ObjectCode._reduce_helper, (self._module, self._code_type, self._name, self._sym_map)
489487

490488
@staticmethod
491-
def from_cubin(module: Union[bytes, str], *,
492-
name: str = "",
493-
symbol_mapping: Optional[dict] = None) -> "ObjectCode":
489+
def from_cubin(module: Union[bytes, str], *, name: str = "", symbol_mapping: Optional[dict] = None) -> "ObjectCode":
494490
"""Create an :class:`ObjectCode` instance from an existing cubin.
495491
496492
Parameters
@@ -508,9 +504,7 @@ def from_cubin(module: Union[bytes, str], *,
508504
return ObjectCode._init(module, "cubin", name=name, symbol_mapping=symbol_mapping)
509505

510506
@staticmethod
511-
def from_ptx(module: Union[bytes, str], *,
512-
name: str = "",
513-
symbol_mapping: Optional[dict] = None) -> "ObjectCode":
507+
def from_ptx(module: Union[bytes, str], *, name: str = "", symbol_mapping: Optional[dict] = None) -> "ObjectCode":
514508
"""Create an :class:`ObjectCode` instance from an existing PTX.
515509
516510
Parameters
@@ -528,9 +522,7 @@ def from_ptx(module: Union[bytes, str], *,
528522
return ObjectCode._init(module, "ptx", name=name, symbol_mapping=symbol_mapping)
529523

530524
@staticmethod
531-
def from_ltoir(module: Union[bytes, str], *,
532-
name: str = "",
533-
symbol_mapping: Optional[dict] = None) -> "ObjectCode":
525+
def from_ltoir(module: Union[bytes, str], *, name: str = "", symbol_mapping: Optional[dict] = None) -> "ObjectCode":
534526
"""Create an :class:`ObjectCode` instance from an existing LTOIR.
535527
536528
Parameters
@@ -548,9 +540,9 @@ def from_ltoir(module: Union[bytes, str], *,
548540
return ObjectCode._init(module, "ltoir", name=name, symbol_mapping=symbol_mapping)
549541

550542
@staticmethod
551-
def from_fatbin(module: Union[bytes, str], *,
552-
name: str = "",
553-
symbol_mapping: Optional[dict] = None) -> "ObjectCode":
543+
def from_fatbin(
544+
module: Union[bytes, str], *, name: str = "", symbol_mapping: Optional[dict] = None
545+
) -> "ObjectCode":
554546
"""Create an :class:`ObjectCode` instance from an existing fatbin.
555547
556548
Parameters
@@ -568,9 +560,9 @@ def from_fatbin(module: Union[bytes, str], *,
568560
return ObjectCode._init(module, "fatbin", name=name, symbol_mapping=symbol_mapping)
569561

570562
@staticmethod
571-
def from_object(module: Union[bytes, str], *,
572-
name: str = "",
573-
symbol_mapping: Optional[dict] = None) -> "ObjectCode":
563+
def from_object(
564+
module: Union[bytes, str], *, name: str = "", symbol_mapping: Optional[dict] = None
565+
) -> "ObjectCode":
574566
"""Create an :class:`ObjectCode` instance from an existing object code.
575567
576568
Parameters
@@ -588,9 +580,9 @@ def from_object(module: Union[bytes, str], *,
588580
return ObjectCode._init(module, "object", name=name, symbol_mapping=symbol_mapping)
589581

590582
@staticmethod
591-
def from_library(module: Union[bytes, str], *,
592-
name: str = "",
593-
symbol_mapping: Optional[dict] = None) -> "ObjectCode":
583+
def from_library(
584+
module: Union[bytes, str], *, name: str = "", symbol_mapping: Optional[dict] = None
585+
) -> "ObjectCode":
594586
"""Create an :class:`ObjectCode` instance from an existing library.
595587
596588
Parameters

0 commit comments

Comments
 (0)