@@ -565,8 +565,8 @@ def test_always_document_param_types(
565
565
) -> None :
566
566
set_python_path ()
567
567
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
570
570
571
571
# Prevent "document isn't included in any toctree" warnings
572
572
for f in Path (app .srcdir ).glob ("*.rst" ):
@@ -633,7 +633,7 @@ def maybe_fix_py310(expected_contents: str) -> str:
633
633
def test_sphinx_output_future_annotations (app : SphinxTestApp , status : StringIO ) -> None :
634
634
set_python_path ()
635
635
636
- app .config .master_doc = "future_annotations" # type: ignore[attr-defined] # create flag
636
+ app .config .master_doc = "future_annotations" # create flag
637
637
app .build ()
638
638
639
639
assert "build succeeded" in status .getvalue () # Build succeeded
@@ -667,8 +667,8 @@ def test_sphinx_output_future_annotations(app: SphinxTestApp, status: StringIO)
667
667
def test_sphinx_output_default_role (app : SphinxTestApp , status : StringIO ) -> None :
668
668
set_python_path ()
669
669
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"
672
672
app .build ()
673
673
674
674
assert "build succeeded" in status .getvalue () # Build succeeded
@@ -716,8 +716,8 @@ def test_sphinx_output_defaults(
716
716
) -> None :
717
717
set_python_path ()
718
718
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
721
721
if isinstance (expected , Exception ):
722
722
with pytest .raises (Exception , match = re .escape (str (expected ))):
723
723
app .build ()
@@ -763,8 +763,8 @@ def test_sphinx_output_formatter(
763
763
) -> None :
764
764
set_python_path ()
765
765
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
768
768
if isinstance (expected , Exception ):
769
769
with pytest .raises (Exception , match = re .escape (str (expected ))):
770
770
app .build ()
@@ -888,7 +888,7 @@ def func(x): # type: ignore[no-untyped-def] # noqa: ANN001, ANN202
888
888
@pytest .mark .sphinx ("text" , testroot = "resolve-typing-guard" )
889
889
def test_resolve_typing_guard_imports (app : SphinxTestApp , status : StringIO , warning : StringIO ) -> None :
890
890
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
892
892
app .build ()
893
893
out = status .getvalue ()
894
894
assert "build succeeded" in out
@@ -917,8 +917,8 @@ def test_no_source_code_type_guard() -> None:
917
917
@patch ("sphinx.writers.text.MAXWIDTH" , 2000 )
918
918
def test_sphinx_output_formatter_no_use_rtype (app : SphinxTestApp , status : StringIO ) -> None :
919
919
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
922
922
app .build ()
923
923
assert "build succeeded" in status .getvalue ()
924
924
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
982
982
@patch ("sphinx.writers.text.MAXWIDTH" , 2000 )
983
983
def test_sphinx_output_with_use_signature (app : SphinxTestApp , status : StringIO ) -> None :
984
984
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
987
987
app .build ()
988
988
assert "build succeeded" in status .getvalue ()
989
989
text_path = Path (app .srcdir ) / "_build" / "text" / "simple.txt"
@@ -1011,8 +1011,8 @@ def test_sphinx_output_with_use_signature(app: SphinxTestApp, status: StringIO)
1011
1011
@patch ("sphinx.writers.text.MAXWIDTH" , 2000 )
1012
1012
def test_sphinx_output_with_use_signature_return (app : SphinxTestApp , status : StringIO ) -> None :
1013
1013
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
1016
1016
app .build ()
1017
1017
assert "build succeeded" in status .getvalue ()
1018
1018
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
1040
1040
@patch ("sphinx.writers.text.MAXWIDTH" , 2000 )
1041
1041
def test_sphinx_output_with_use_signature_and_return (app : SphinxTestApp , status : StringIO ) -> None :
1042
1042
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
1046
1046
app .build ()
1047
1047
assert "build succeeded" in status .getvalue ()
1048
1048
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:
1070
1070
@patch ("sphinx.writers.text.MAXWIDTH" , 2000 )
1071
1071
def test_default_annotation_without_typehints (app : SphinxTestApp , status : StringIO ) -> None :
1072
1072
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"
1075
1075
app .build ()
1076
1076
assert "build succeeded" in status .getvalue ()
1077
1077
text_path = Path (app .srcdir ) / "_build" / "text" / "without_complete_typehints.txt"
0 commit comments