@@ -87,7 +87,7 @@ def preprocess_soup(soup: BeautifulSoup) -> None:
87
87
for dt in soup .select ("span.sig-return" ):
88
88
dt .replace_with (NavigableString (dt .get_text ()))
89
89
90
- for div in soup .findAll ("script" ):
90
+ for div in soup .find_all ("script" ):
91
91
if div .get ("src" ):
92
92
div ["src" ] = div ["src" ].split ("?v=" )[0 ]
93
93
print (div ["src" ])
@@ -120,24 +120,25 @@ def test_index(page: BeautifulSoup, html_regression: HTMLRegressionFixture):
120
120
121
121
class_count = 0
122
122
123
- for class_ in page .findAll ("dl" ):
123
+ for class_ in page .find_all ("dl" ):
124
124
if "enum" not in class_ ["class" ]:
125
125
continue
126
126
127
127
if class_count == 0 :
128
128
assert class_ .find ("dt" )["id" ] == "enum_tools.demo.People"
129
- assert class_ .find ("dd" ).findAll ('p' )[0 ].contents [0 ] == "An enumeration of people."
129
+ assert class_ .find ("dd" ).find_all ('p' )[0 ].contents [0 ] == "An enumeration of people."
130
130
elif class_count == 1 :
131
131
assert class_ .find ("dt" )["id" ] == "enum_tools.demo.NoMethods"
132
- assert class_ .find ("dd" ).findAll ('p' )[0 ].contents [0 ] == "An enumeration of people without any methods."
132
+ assert class_ .find ("dd" ).find_all ('p'
133
+ )[0 ].contents [0 ] == "An enumeration of people without any methods."
133
134
134
135
tag = '<code class="xref py py-class docutils literal notranslate">int</code>'
135
- assert str (class_ .find ("dd" ).findAll ('p' )[1 ].contents [0 ]) == tag
136
- assert class_ .find ("dd" ).findAll ('p' )[2 ].contents [0 ] == "Valid values are as follows:"
136
+ assert str (class_ .find ("dd" ).find_all ('p' )[1 ].contents [0 ]) == tag
137
+ assert class_ .find ("dd" ).find_all ('p' )[2 ].contents [0 ] == "Valid values are as follows:"
137
138
138
139
attr_count = 0
139
140
140
- for attr in class_ .findAll ("dl" ):
141
+ for attr in class_ .find_all ("dl" ):
141
142
if "attribute" not in attr ["class" ]:
142
143
continue
143
144
@@ -219,7 +220,7 @@ def test_flag(page: BeautifulSoup, html_regression: HTMLRegressionFixture):
219
220
220
221
class_count = 0
221
222
222
- for class_ in page .findAll ("dl" ):
223
+ for class_ in page .find_all ("dl" ):
223
224
if "flag" not in class_ ["class" ]:
224
225
continue
225
226
@@ -228,15 +229,15 @@ def test_flag(page: BeautifulSoup, html_regression: HTMLRegressionFixture):
228
229
elif class_count == 1 :
229
230
assert class_ .find ("dt" )["id" ] == "id0"
230
231
231
- assert class_ .find ("dd" ).findAll ('p' )[0 ].contents [0 ] == "An enumeration of status codes."
232
+ assert class_ .find ("dd" ).find_all ('p' )[0 ].contents [0 ] == "An enumeration of status codes."
232
233
233
234
tag = '<code class="xref py py-class docutils literal notranslate">int</code>'
234
- assert str (class_ .find ("dd" ).findAll ('p' )[1 ].contents [0 ]) == tag
235
- assert class_ .find ("dd" ).findAll ('p' )[2 ].contents [0 ] == "Valid values are as follows:"
235
+ assert str (class_ .find ("dd" ).find_all ('p' )[1 ].contents [0 ]) == tag
236
+ assert class_ .find ("dd" ).find_all ('p' )[2 ].contents [0 ] == "Valid values are as follows:"
236
237
237
238
attr_count = 0
238
239
239
- for attr in class_ .findAll ("dl" ):
240
+ for attr in class_ .find_all ("dl" ):
240
241
if "attribute" not in attr ["class" ]:
241
242
continue
242
243
@@ -305,24 +306,24 @@ def test_no_member_doc(page: BeautifulSoup, html_regression: HTMLRegressionFixtu
305
306
306
307
class_count = 0
307
308
308
- for class_ in page .findAll ("dl" ):
309
+ for class_ in page .find_all ("dl" ):
309
310
if "enum" not in class_ ["class" ]:
310
311
continue
311
312
312
313
assert class_ .find ("dt" )["id" ] == "enum_tools.demo.NoMemberDoc"
313
- assert class_ .find ("dd" ).findAll ('p' )[0 ].contents [
314
+ assert class_ .find ("dd" ).find_all ('p' )[0 ].contents [
314
315
0 ] == "An enumeration of people without any member docstrings."
315
316
316
317
if class_count == 0 :
317
318
tag = '<code class="xref py py-class docutils literal notranslate">int</code>'
318
- assert str (class_ .find ("dd" ).findAll ('p' )[1 ].contents [0 ]) == tag
319
- assert class_ .find ("dd" ).findAll ('p' )[2 ].contents [0 ] == "Valid values are as follows:"
319
+ assert str (class_ .find ("dd" ).find_all ('p' )[1 ].contents [0 ]) == tag
320
+ assert class_ .find ("dd" ).find_all ('p' )[2 ].contents [0 ] == "Valid values are as follows:"
320
321
else :
321
- assert class_ .find ("dd" ).findAll ('p' )[1 ].contents [0 ] == "Valid values are as follows:"
322
+ assert class_ .find ("dd" ).find_all ('p' )[1 ].contents [0 ] == "Valid values are as follows:"
322
323
323
324
attr_count = 0
324
325
325
- for attr in class_ .findAll ("dl" ):
326
+ for attr in class_ .find_all ("dl" ):
326
327
if "attribute" not in attr ["class" ]:
327
328
continue
328
329
0 commit comments