Skip to content

Commit

Permalink
Only check for public symbols in public packages
Browse files Browse the repository at this point in the history
  • Loading branch information
aabmass committed Feb 10, 2022
1 parent e0a4f31 commit dd62c63
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/public_symbols_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,17 @@ def get_symbols(change_type, diff_lines_getter, prefix):
):

b_file_path = diff_lines.b_blob.path
b_file_path_obj = Path(b_file_path)

if (
Path(b_file_path).suffix != ".py"
b_file_path_obj.suffix != ".py"
or "opentelemetry" not in b_file_path
or any(
# leading underscore
part[0] == "_" and len(part) > 1 and part[1] != "_"
or part == "tests"
for part in b_file_path_obj.parts
)
):
continue

Expand Down

0 comments on commit dd62c63

Please sign in to comment.