Skip to content

Commit

Permalink
Merge branch 'main' into discover-more
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat committed Apr 23, 2024
2 parents 9fc15dd + 4a13deb commit fc21219
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ repos:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.7.0"
rev: "1.8.0"
hooks:
- id: pyproject-fmt
additional_dependencies: ["tox>=4.12.1"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.7"
rev: "v0.4.1"
hooks:
- id: ruff-format
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion src/virtualenv/activation/via_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _generate(self, replacements, templates, to_folder, creator):
if dest.exists():
dest.unlink()
# Powershell assumes Windows 1252 encoding when reading files without BOM
encoding = "utf-8-sig" if template.endswith(".ps1") else "utf-8"
encoding = "utf-8-sig" if str(template).endswith(".ps1") else "utf-8"
# use write_bytes to avoid platform specific line normalization (\n -> \r\n)
dest.write_bytes(text.encode(encoding))
generated.append(dest)
Expand Down

0 comments on commit fc21219

Please sign in to comment.