Skip to content

Commit 2c6f2e7

Browse files
Doc: Update checking of parameter consistency
This commit updates the script that checks for parameter consistency. Specifically, we check the parameters in both methods AND functions
1 parent c29805d commit 2c6f2e7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

etc/check-params.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def extract_documented_signature(func, name) -> tuple[dict[str, str], str]:
6767
param_to_typehint = {}
6868
return_typehint = ""
6969
field_list = func.find("dl", class_="field-list simple")
70-
7170
if not field_list:
7271
return param_to_typehint, return_typehint
7372

@@ -157,7 +156,7 @@ def process_file(filename):
157156
content = f.read()
158157

159158
soup = BeautifulSoup(content, "html.parser")
160-
for func in soup.find_all("dl", class_="py function"):
159+
for func in soup.find_all("dl", class_=lambda x: x in {"py function", "py method"}):
161160
first_segment = func.find("p")
162161
if first_segment and "Overloaded function" in first_segment.get_text():
163162
continue

0 commit comments

Comments
 (0)