Skip to content

Commit

Permalink
Merge branch 'dependabot/pip/ruff-0.4.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLovering committed May 16, 2024
2 parents e53e2e8 + cfc5be0 commit 6e959e3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
4 changes: 2 additions & 2 deletions kubernetes/scripts/create_x509_user_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def approve_cert_signing_request(csr: str, tmpdir: str) -> None:
run_and_return_output(f"kubectl apply -f {csr_path}", tmpdir)
run_and_return_output(f"kubectl certificate approve {user}")
approved_cert = run_and_return_output(f"kubectl get csr {user} -o jsonpath='{{.status.certificate}}'")
with Path(tmpdir, f"{user}.crt").open("w") as f:
with Path(tmpdir, f"{user}.crt").open("w", encoding="locale") as f:
f.write(base64.b64decode(approved_cert).decode("utf-8"))
run_and_return_output(f"kubectl delete csr {user}")

Expand All @@ -86,7 +86,7 @@ def give_user_perms(tmpdir: str) -> None:
def build_kubectl_config(tmpdir: str) -> None:
"""Build up a kubectl config from all the files in the tmpdir."""
cluster_public_key = run_and_return_output(r"kubectl get cm kube-root-ca.crt -o jsonpath={.data.ca\.crt}")
with Path(tmpdir, "ca.crt").open("w") as f:
with Path(tmpdir, "ca.crt").open("w", encoding="locale") as f:
f.write(cluster_public_key)
cluster_url = run_and_return_output("kubectl config view --minify --output jsonpath={.clusters[*].cluster.server}")

Expand Down
38 changes: 19 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ readme = "README.md"
python = ">3.11,<4.0"

pre-commit = "3.7.1"
ruff = "0.4.2"
ruff = "0.4.4"
taskipy = "1.12.2"

[tool.poetry.group.ansible.dependencies]
Expand All @@ -32,6 +32,7 @@ extend-exclude = [".cache"]
line-length = 120
unsafe-fixes = true
preview = true
output-format = "concise"

[tool.ruff.lint]
select = ["ALL"]
Expand Down

0 comments on commit 6e959e3

Please sign in to comment.