@@ -289,7 +289,7 @@ def test_lunr_search(self):
289
289
file_pattern = 'example_pkg/subpkg/index.html' )
290
290
# Only build lunr search when --html
291
291
with redirect_streams () as (_ , stderr ):
292
- run (EXAMPLE_MODULE , config = 'lunr_search={"fuzziness": 1}' )
292
+ run (EXAMPLE_MODULE , config = 'lunr_search={"fuzziness": 1}' )
293
293
self .assertFalse (stderr .read ())
294
294
295
295
def test_force (self ):
@@ -898,7 +898,7 @@ class Foo(enum.Enum):
898
898
self .assertEqual (func .params (link = lambda x : '' ), ['a=<object object>' ])
899
899
900
900
# typed
901
- def f (a : int , * b , c : typing .List [pdoc .Doc ] = []): pass
901
+ def f (a : int , * b , c : typing .List [pdoc .Doc ] = []): pass # noqa: E704
902
902
func = pdoc .Function ('f' , mod , f )
903
903
self .assertEqual (func .params (), ['a' , '*b' , "c=[]" ])
904
904
self .assertEqual (func .params (annotate = True ),
@@ -913,14 +913,14 @@ def link(dobj):
913
913
"c:\N{NBSP} List[<a href=\" #pdoc.Doc\" >Doc</a>]\N{NBSP} =\N{NBSP} []" ])
914
914
915
915
# typed, linked, GH-311
916
- def f (a : typing .Dict [str , pdoc .Doc ]): pass
916
+ def f (a : typing .Dict [str , pdoc .Doc ]): pass # noqa: E704
917
917
918
918
func = pdoc .Function ('f' , mod , f )
919
919
self .assertEqual (func .params (annotate = True , link = link ),
920
920
["a:\N{NBSP} Dict[str,\N{NBSP} <a href=\" #pdoc.Doc\" >Doc</a>]" ])
921
921
922
922
# shadowed name
923
- def f (pdoc : int ): pass
923
+ def f (pdoc : int ): pass # noqa: E704
924
924
func = pdoc .Function ('f' , mod , f )
925
925
self .assertEqual (func .params (annotate = True , link = link ), ['pdoc:\N{NBSP} int' ])
926
926
@@ -974,7 +974,7 @@ def test_test_Function_params_python38_specific(self):
974
974
self .assertEqual (func .params (), ['a' , '/' ])
975
975
976
976
def test_Function_return_annotation (self ):
977
- def f () -> typing .List [typing .Union [str , pdoc .Doc ]]: return []
977
+ def f () -> typing .List [typing .Union [str , pdoc .Doc ]]: return [] # noqa: E704
978
978
func = pdoc .Function ('f' , DUMMY_PDOC_MODULE , f )
979
979
self .assertEqual (func .return_annotation (), 'List[str\N{NBSP} |\N{NBSP} pdoc.Doc]' )
980
980
0 commit comments