check_consistent.py: Add check ensuring packages are not installed for unspecified platforms (#9265)

This commit is contained in:
Nikita Sobolev
2022-11-25 13:11:59 +03:00
committed by GitHub
parent 59f35b51b2
commit bdf036d516
3 changed files with 23 additions and 6 deletions

View File

@@ -12,6 +12,9 @@ from typing import NamedTuple
import pathspec # type: ignore[import]
import tomli
# Used to install system-wide packages for different OS types:
METADATA_MAPPING = {"linux": "apt_dependencies", "darwin": "brew_dependencies", "win32": "choco_dependencies"}
def strip_comments(text: str) -> str:
return text.split("#")[0].strip()