From 069dca9c534bf380659da7fc7a1a83476419a2da Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 20 Nov 2022 19:40:56 +0100 Subject: [PATCH] The default encoding of Python sources is UTF-8 Python 3 assumes the encoding is UTF-8 by default, and so do or should do tools such as text editors when opening Python files. No need to explicitly set `*- coding: utf-8 -*-`. --- docs/conf.py | 1 - setuptools/command/upload_docs.py | 1 - setuptools/dist.py | 1 - setuptools/tests/script-with-bom.py | 4 +--- setuptools/tests/test_manifest.py | 1 - setuptools/tests/test_msvc14.py | 1 - setuptools/tests/test_wheel.py | 2 -- 7 files changed, 1 insertion(+), 10 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index a9c9800af6..64c2625f4a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- extensions = [ 'sphinx.ext.autodoc', diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 3263f07f48..63eb28c70c 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to diff --git a/setuptools/dist.py b/setuptools/dist.py index 8242354886..624a67f236 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- __all__ = ['Distribution'] import io diff --git a/setuptools/tests/script-with-bom.py b/setuptools/tests/script-with-bom.py index 22dee0d2a3..93d28f1600 100644 --- a/setuptools/tests/script-with-bom.py +++ b/setuptools/tests/script-with-bom.py @@ -1,3 +1 @@ -# -*- coding: utf-8 -*- - -result = 'passed' +result = 'passed' diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index ecc83c2fdd..4a8789aea3 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """sdist tests""" import contextlib diff --git a/setuptools/tests/test_msvc14.py b/setuptools/tests/test_msvc14.py index 1aca12dd37..271d6be562 100644 --- a/setuptools/tests/test_msvc14.py +++ b/setuptools/tests/test_msvc14.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Tests for msvc support module (msvc14 unit tests). """ diff --git a/setuptools/tests/test_wheel.py b/setuptools/tests/test_wheel.py index 89d65d0b79..b2bbdfae7f 100644 --- a/setuptools/tests/test_wheel.py +++ b/setuptools/tests/test_wheel.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - """wheel tests """