@@ -565,8 +565,8 @@ def test_always_document_param_types(
565565) -> None :
566566 set_python_path ()
567567
568- app .config .always_document_param_types = always_document_param_types # type: ignore[attr-defined] # create flag
569- app .config .autodoc_mock_imports = ["mailbox" ] # type: ignore[attr-defined] # create flag
568+ app .config .always_document_param_types = always_document_param_types # create flag
569+ app .config .autodoc_mock_imports = ["mailbox" ] # create flag
570570
571571 # Prevent "document isn't included in any toctree" warnings
572572 for f in Path (app .srcdir ).glob ("*.rst" ):
@@ -633,7 +633,7 @@ def maybe_fix_py310(expected_contents: str) -> str:
633633def test_sphinx_output_future_annotations (app : SphinxTestApp , status : StringIO ) -> None :
634634 set_python_path ()
635635
636- app .config .master_doc = "future_annotations" # type: ignore[attr-defined] # create flag
636+ app .config .master_doc = "future_annotations" # create flag
637637 app .build ()
638638
639639 assert "build succeeded" in status .getvalue () # Build succeeded
@@ -667,8 +667,8 @@ def test_sphinx_output_future_annotations(app: SphinxTestApp, status: StringIO)
667667def test_sphinx_output_default_role (app : SphinxTestApp , status : StringIO ) -> None :
668668 set_python_path ()
669669
670- app .config .master_doc = "simple_default_role" # type: ignore[attr-defined] # create flag
671- app .config .default_role = "literal" # type: ignore[attr-defined]
670+ app .config .master_doc = "simple_default_role" # create flag
671+ app .config .default_role = "literal"
672672 app .build ()
673673
674674 assert "build succeeded" in status .getvalue () # Build succeeded
@@ -716,8 +716,8 @@ def test_sphinx_output_defaults(
716716) -> None :
717717 set_python_path ()
718718
719- app .config .master_doc = "simple" # type: ignore[attr-defined] # create flag
720- app .config .typehints_defaults = defaults_config_val # type: ignore[attr-defined] # create flag
719+ app .config .master_doc = "simple" # create flag
720+ app .config .typehints_defaults = defaults_config_val # create flag
721721 if isinstance (expected , Exception ):
722722 with pytest .raises (Exception , match = re .escape (str (expected ))):
723723 app .build ()
@@ -763,8 +763,8 @@ def test_sphinx_output_formatter(
763763) -> None :
764764 set_python_path ()
765765
766- app .config .master_doc = "simple" # type: ignore[attr-defined] # create flag
767- app .config .typehints_formatter = formatter_config_val # type: ignore[attr-defined] # create flag
766+ app .config .master_doc = "simple" # create flag
767+ app .config .typehints_formatter = formatter_config_val # create flag
768768 if isinstance (expected , Exception ):
769769 with pytest .raises (Exception , match = re .escape (str (expected ))):
770770 app .build ()
@@ -888,7 +888,7 @@ def func(x): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202
888888@pytest .mark .sphinx ("text" , testroot = "resolve-typing-guard" )
889889def test_resolve_typing_guard_imports (app : SphinxTestApp , status : StringIO , warning : StringIO ) -> None :
890890 set_python_path ()
891- app .config .autodoc_mock_imports = ["viktor" ] # type: ignore[attr-defined] # create flag
891+ app .config .autodoc_mock_imports = ["viktor" ] # create flag
892892 app .build ()
893893 out = status .getvalue ()
894894 assert "build succeeded" in out
@@ -917,8 +917,8 @@ def test_no_source_code_type_guard() -> None:
917917@patch ("sphinx.writers.text.MAXWIDTH" , 2000 )
918918def test_sphinx_output_formatter_no_use_rtype (app : SphinxTestApp , status : StringIO ) -> None :
919919 set_python_path ()
920- app .config .master_doc = "simple_no_use_rtype" # type: ignore[attr-defined] # create flag
921- app .config .typehints_use_rtype = False # type: ignore[attr-defined]
920+ app .config .master_doc = "simple_no_use_rtype" # create flag
921+ app .config .typehints_use_rtype = False
922922 app .build ()
923923 assert "build succeeded" in status .getvalue ()
924924 text_path = Path (app .srcdir ) / "_build" / "text" / "simple_no_use_rtype.txt"
@@ -982,8 +982,8 @@ def test_sphinx_output_formatter_no_use_rtype(app: SphinxTestApp, status: String
982982@patch ("sphinx.writers.text.MAXWIDTH" , 2000 )
983983def test_sphinx_output_with_use_signature (app : SphinxTestApp , status : StringIO ) -> None :
984984 set_python_path ()
985- app .config .master_doc = "simple" # type: ignore[attr-defined] # create flag
986- app .config .typehints_use_signature = True # type: ignore[attr-defined]
985+ app .config .master_doc = "simple" # create flag
986+ app .config .typehints_use_signature = True
987987 app .build ()
988988 assert "build succeeded" in status .getvalue ()
989989 text_path = Path (app .srcdir ) / "_build" / "text" / "simple.txt"
@@ -1011,8 +1011,8 @@ def test_sphinx_output_with_use_signature(app: SphinxTestApp, status: StringIO)
10111011@patch ("sphinx.writers.text.MAXWIDTH" , 2000 )
10121012def test_sphinx_output_with_use_signature_return (app : SphinxTestApp , status : StringIO ) -> None :
10131013 set_python_path ()
1014- app .config .master_doc = "simple" # type: ignore[attr-defined] # create flag
1015- app .config .typehints_use_signature_return = True # type: ignore[attr-defined]
1014+ app .config .master_doc = "simple" # create flag
1015+ app .config .typehints_use_signature_return = True
10161016 app .build ()
10171017 assert "build succeeded" in status .getvalue ()
10181018 text_path = Path (app .srcdir ) / "_build" / "text" / "simple.txt"
@@ -1040,9 +1040,9 @@ def test_sphinx_output_with_use_signature_return(app: SphinxTestApp, status: Str
10401040@patch ("sphinx.writers.text.MAXWIDTH" , 2000 )
10411041def test_sphinx_output_with_use_signature_and_return (app : SphinxTestApp , status : StringIO ) -> None :
10421042 set_python_path ()
1043- app .config .master_doc = "simple" # type: ignore[attr-defined] # create flag
1044- app .config .typehints_use_signature = True # type: ignore[attr-defined]
1045- app .config .typehints_use_signature_return = True # type: ignore[attr-defined]
1043+ app .config .master_doc = "simple" # create flag
1044+ app .config .typehints_use_signature = True
1045+ app .config .typehints_use_signature_return = True
10461046 app .build ()
10471047 assert "build succeeded" in status .getvalue ()
10481048 text_path = Path (app .srcdir ) / "_build" / "text" / "simple.txt"
@@ -1070,8 +1070,8 @@ def test_sphinx_output_with_use_signature_and_return(app: SphinxTestApp, status:
10701070@patch ("sphinx.writers.text.MAXWIDTH" , 2000 )
10711071def test_default_annotation_without_typehints (app : SphinxTestApp , status : StringIO ) -> None :
10721072 set_python_path ()
1073- app .config .master_doc = "without_complete_typehints" # type: ignore[attr-defined]# create flag
1074- app .config .typehints_defaults = "comma" # type: ignore[attr-defined]
1073+ app .config .master_doc = "without_complete_typehints" # create flag
1074+ app .config .typehints_defaults = "comma"
10751075 app .build ()
10761076 assert "build succeeded" in status .getvalue ()
10771077 text_path = Path (app .srcdir ) / "_build" / "text" / "without_complete_typehints.txt"
0 commit comments