@@ -410,7 +410,8 @@ def hello(self, arg: object) -> None:
410
410
411
411
pm .add_hookspecs (Api )
412
412
413
- # make sure a bad signature still raises an error when using specname
413
+ """make sure a bad signature still raises an error when using specname"""
414
+
414
415
class Plugin :
415
416
@hookimpl (specname = "hello" )
416
417
def foo (self , arg : int , too , many , args ) -> int :
@@ -419,8 +420,9 @@ def foo(self, arg: int, too, many, args) -> int:
419
420
with pytest .raises (PluginValidationError ):
420
421
pm .register (Plugin ())
421
422
422
- # make sure check_pending still fails if specname doesn't have a
423
- # corresponding spec. EVEN if the function name matches one.
423
+ """make sure check_pending still fails if specname doesn't have a
424
+ corresponding spec. EVEN if the function name matches one."""
425
+
424
426
class Plugin2 :
425
427
@hookimpl (specname = "bar" )
426
428
def hello (self , arg : int ) -> int :
@@ -456,9 +458,9 @@ def test_hookcaller_repr_with_saferepr_failure(
456
458
) -> None :
457
459
@addmeth ()
458
460
def he_method2 () -> None :
459
- # Intentional error to make the repr fail
461
+ """ Intentional error to make the repr fail"""
460
462
raise ValueError ("Intentional error in he_method2" )
461
463
462
- # Verify that HookCaller.repr with saferepr still works despite the error
464
+ """ Verify that HookCaller.repr with saferepr still works despite the error"""
463
465
expected_repr = f"<HookCaller { saferepr (hc .name )} >"
464
466
assert repr (hc ) == expected_repr
0 commit comments