[pre-commit.ci] pre-commit autoupdate (#1423)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.249 → v0.0.253](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.249...v0.0.253)

* fix ruff warnings

* chore: fix pylint warnings

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
pre-commit-ci[bot]
2023-02-28 08:43:58 -05:00
committed by GitHub
co-authored by pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Grzegorz Bokota Henry Schreiner
parent 422509e168
commit c72e27e65a
5 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ repos:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.249
rev: v0.0.253
hooks:
- id: ruff
args: ["--fix"]
+1 -1
View File
@@ -117,7 +117,7 @@ class ParsedEnvironment:
prev_environment: Mapping[str, str],
executor: bashlex_eval.EnvironmentExecutor | None = None,
) -> dict[str, str]:
environment = dict(**prev_environment)
environment = {**prev_environment}
for assignment in self.assignments:
value = assignment.evaluated_value(environment=environment, executor=executor)
+2 -2
View File
@@ -543,8 +543,8 @@ def _parse_constraints_for_virtualenv(
constraint_path = Path(dependency_constraint_flags[1])
assert constraint_path.exists()
with constraint_path.open(encoding="utf-8") as constraint_file:
for line in constraint_file:
line = line.strip()
for line_ in constraint_file:
line = line_.strip()
if not line:
continue
if line.startswith("#"):
+1
View File
@@ -115,6 +115,7 @@ messages_control.disable = [
"unsubscriptable-object",
"wrong-import-position",
"unused-argument", # Handled by Ruff
"broad-exception-raised", # Could be improved eventually
]
[tool.ruff]
+1 -1
View File
@@ -33,7 +33,7 @@ class TestProject:
with file_path.open("w", encoding="utf8") as f:
if isinstance(content, jinja2.Template):
content = content.render(self.template_context)
content = content.render(self.template_context) # noqa: PLW2901
f.write(content)