Skip to content

Commit 364e2a1

Browse files
committed
finding more deprecated stuff
1 parent 4cdd703 commit 364e2a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/check_deprecations.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
# Regex pattern to find deprecation instances
2121
DEPRECATION_PATTERN = re.compile(r'deprecation\((\d+),')
22+
DEPRECATED_PATTERN = re.compile(r'deprecated_function_alias\((\d+),')
2223

2324

2425
def get_pr_closed_date(github_token: str, pr_number: int) -> datetime:
@@ -37,6 +38,9 @@ def search_deprecations(path: str) -> set[tuple[str, int]]:
3738
matches = DEPRECATION_PATTERN.findall(content)
3839
for match in matches:
3940
deprecations.add((str(filepath), int(match)))
41+
matches = DEPRECATED_PATTERN.findall(content)
42+
for match in matches:
43+
deprecations.add((str(filepath), int(match)))
4044
except (PermissionError, UnicodeDecodeError):
4145
pass
4246
print(f"Found {len(deprecations)} deprecations.")

0 commit comments

Comments
 (0)