Upgrade ruff to 0.0.285 (#98647)
This commit is contained in:
@@ -397,4 +397,5 @@ def validate(integrations: dict[str, Integration], config: Config) -> None:
|
||||
["pre-commit", "run", "--hook-stage", "manual", "prettier", "--files"]
|
||||
+ manifests_resorted,
|
||||
stdout=subprocess.DEVNULL,
|
||||
check=True,
|
||||
)
|
||||
|
||||
@@ -77,11 +77,13 @@ def main():
|
||||
pipe_null = {} if args.develop else {"stdout": subprocess.DEVNULL}
|
||||
|
||||
print("Running hassfest to pick up new information.")
|
||||
subprocess.run(["python", "-m", "script.hassfest"], **pipe_null)
|
||||
subprocess.run(["python", "-m", "script.hassfest"], **pipe_null, check=True)
|
||||
print()
|
||||
|
||||
print("Running gen_requirements_all to pick up new information.")
|
||||
subprocess.run(["python", "-m", "script.gen_requirements_all"], **pipe_null)
|
||||
subprocess.run(
|
||||
["python", "-m", "script.gen_requirements_all"], **pipe_null, check=True
|
||||
)
|
||||
print()
|
||||
|
||||
print("Running script/translations_develop to pick up new translation strings.")
|
||||
@@ -95,13 +97,16 @@ def main():
|
||||
info.domain,
|
||||
],
|
||||
**pipe_null,
|
||||
check=True,
|
||||
)
|
||||
print()
|
||||
|
||||
if args.develop:
|
||||
print("Running tests")
|
||||
print(f"$ pytest -vvv tests/components/{info.domain}")
|
||||
subprocess.run(["pytest", "-vvv", f"tests/components/{info.domain}"])
|
||||
subprocess.run(
|
||||
["pytest", "-vvv", f"tests/components/{info.domain}"], check=True
|
||||
)
|
||||
print()
|
||||
|
||||
docs.print_relevant_docs(args.template, info)
|
||||
|
||||
@@ -44,7 +44,8 @@ def run_download_docker():
|
||||
"json",
|
||||
"--unzip-to",
|
||||
"/opt/dest",
|
||||
]
|
||||
],
|
||||
check=False,
|
||||
)
|
||||
print()
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ def run_upload_docker():
|
||||
"--convert-placeholders=false",
|
||||
"--replace-modified",
|
||||
],
|
||||
check=False,
|
||||
)
|
||||
print()
|
||||
|
||||
|
||||
@@ -48,7 +48,9 @@ def get_current_branch():
|
||||
"""Get current branch."""
|
||||
return (
|
||||
subprocess.run(
|
||||
["git", "rev-parse", "--abbrev-ref", "HEAD"], stdout=subprocess.PIPE
|
||||
["git", "rev-parse", "--abbrev-ref", "HEAD"],
|
||||
stdout=subprocess.PIPE,
|
||||
check=True,
|
||||
)
|
||||
.stdout.decode()
|
||||
.strip()
|
||||
|
||||
@@ -161,7 +161,10 @@ def main():
|
||||
)
|
||||
arguments = parser.parse_args()
|
||||
|
||||
if arguments.commit and subprocess.run(["git", "diff", "--quiet"]).returncode == 1:
|
||||
if (
|
||||
arguments.commit
|
||||
and subprocess.run(["git", "diff", "--quiet"], check=False).returncode == 1
|
||||
):
|
||||
print("Cannot use --commit because git is dirty.")
|
||||
return
|
||||
|
||||
@@ -177,7 +180,7 @@ def main():
|
||||
if not arguments.commit:
|
||||
return
|
||||
|
||||
subprocess.run(["git", "commit", "-nam", f"Bumped version to {bumped}"])
|
||||
subprocess.run(["git", "commit", "-nam", f"Bumped version to {bumped}"], check=True)
|
||||
|
||||
|
||||
def test_bump_version():
|
||||
|
||||
Reference in New Issue
Block a user