@@ -410,7 +410,8 @@ def hello(self, arg: object) -> None:
410410
411411 pm .add_hookspecs (Api )
412412
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+
414415 class Plugin :
415416 @hookimpl (specname = "hello" )
416417 def foo (self , arg : int , too , many , args ) -> int :
@@ -419,8 +420,9 @@ def foo(self, arg: int, too, many, args) -> int:
419420 with pytest .raises (PluginValidationError ):
420421 pm .register (Plugin ())
421422
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+
424426 class Plugin2 :
425427 @hookimpl (specname = "bar" )
426428 def hello (self , arg : int ) -> int :
@@ -456,9 +458,9 @@ def test_hookcaller_repr_with_saferepr_failure(
456458) -> None :
457459 @addmeth ()
458460 def he_method2 () -> None :
459- # Intentional error to make the repr fail
461+ """ Intentional error to make the repr fail"""
460462 raise ValueError ("Intentional error in he_method2" )
461463
462- # Verify that HookCaller.repr with saferepr still works despite the error
464+ """ Verify that HookCaller.repr with saferepr still works despite the error"""
463465 expected_repr = f"<HookCaller { saferepr (hc .name )} >"
464466 assert repr (hc ) == expected_repr
0 commit comments