python-hatch/hatch-pr659-utf8.patch

44 lines
1.9 KiB
Diff
Raw Normal View History

2023-01-10 14:21:55 +00:00
From c42f1d7086e4a8d1a7e1f299c50db2f1a16a2e3d Mon Sep 17 00:00:00 2001
From: Ofek Lev <ofekmeister@gmail.com>
Date: Sat, 10 Dec 2022 11:49:48 -0500
Subject: [PATCH] Remove unnecessary encoding declaration
---
backend/src/hatchling/version/core.py | 1 -
docs/history/hatchling.md | 4 ++++
tests/backend/builders/hooks/test_version.py | 2 --
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/backend/src/hatchling/version/core.py b/backend/src/hatchling/version/core.py
index 38c26aca7..cad01f94b 100644
--- a/backend/src/hatchling/version/core.py
+++ b/backend/src/hatchling/version/core.py
@@ -5,7 +5,6 @@
DEFAULT_PATTERN = r'(?i)^(__version__|VERSION) *= *([\'"])v?(?P<version>.+?)\2'
DEFAULT_TEMPLATE = """\
-# -*- coding: utf-8 -*-
# This file is auto-generated by Hatchling. As such, do not:
# - modify
# - track in version control e.g. be sure to add to .gitignore
diff --git a/tests/backend/builders/hooks/test_version.py b/tests/backend/builders/hooks/test_version.py
index 3b916d3ed..b03500292 100644
--- a/tests/backend/builders/hooks/test_version.py
+++ b/tests/backend/builders/hooks/test_version.py
@@ -91,7 +91,6 @@ def update(self, metadata):
assert expected_file.is_file()
assert expected_file.read_text() == helpers.dedent(
"""
- # -*- coding: utf-8 -*-
# This file is auto-generated by Hatchling. As such, do not:
# - modify
# - track in version control e.g. be sure to add to .gitignore
@@ -132,7 +131,6 @@ def update(self, metadata):
assert expected_file.is_file()
assert expected_file.read_text() == helpers.dedent(
"""
- # -*- coding: utf-8 -*-
# This file is auto-generated by Hatchling. As such, do not:
# - modify
# - track in version control e.g. be sure to add to .gitignore