Add 'do not edit' comment to generated files (#103923)

This commit is contained in:
Ruslan Sayfutdinov 2023-11-13 18:33:42 +00:00 committed by GitHub
parent 7ab4d9793a
commit 1610dd94f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,5 @@
# Automatically generated by gen_requirements_all.py, do not edit
aiodiscover==1.5.1
aiohttp-fast-url-dispatcher==0.1.0
aiohttp-zlib-ng==0.1.1

View File

@ -1,3 +1,5 @@
# Automatically generated by gen_requirements_all.py, do not edit
-c homeassistant/package_constraints.txt
# Home Assistant Core

View File

@ -1,4 +1,6 @@
# Home Assistant Core, full dependency set
# Automatically generated by gen_requirements_all.py, do not edit
-r requirements.txt
# homeassistant.components.aemet

View File

@ -182,6 +182,10 @@ get-mac==1000000000.0.0
charset-normalizer==3.2.0
"""
GENERATED_MESSAGE = (
f"# Automatically generated by {Path(__file__).name}, do not edit\n\n"
)
IGNORE_PRE_COMMIT_HOOK_ID = (
"check-executables-have-shebangs",
"check-json",
@ -354,6 +358,7 @@ def generate_requirements_list(reqs: dict[str, list[str]]) -> str:
def requirements_output() -> str:
"""Generate output for requirements."""
output = [
GENERATED_MESSAGE,
"-c homeassistant/package_constraints.txt\n",
"\n",
"# Home Assistant Core\n",
@ -368,6 +373,7 @@ def requirements_all_output(reqs: dict[str, list[str]]) -> str:
"""Generate output for requirements_all."""
output = [
"# Home Assistant Core, full dependency set\n",
GENERATED_MESSAGE,
"-r requirements.txt\n",
]
output.append(generate_requirements_list(reqs))
@ -379,8 +385,7 @@ def requirements_test_all_output(reqs: dict[str, list[str]]) -> str:
"""Generate output for test_requirements."""
output = [
"# Home Assistant tests, full dependency set\n",
f"# Automatically generated by {Path(__file__).name}, do not edit\n",
"\n",
GENERATED_MESSAGE,
"-r requirements_test.txt\n",
]
@ -425,7 +430,8 @@ def requirements_pre_commit_output() -> str:
def gather_constraints() -> str:
"""Construct output for constraint file."""
return (
"\n".join(
GENERATED_MESSAGE
+ "\n".join(
sorted(
{
*core_requirements(),