Skip to content

Commit

Permalink
Remove encoding declarations
Browse files Browse the repository at this point in the history
In Python 3, UTF-8 is the default encoding when no encoding
declaration is present, and omitting the encoding declaration when
UTF-8 is intended is officially suggested.

- https://docs.python.org/3/reference/lexical_analysis.html
- https://pep8.org/#source-file-encoding

Furthermore, not all files in this project had them (and their
presence or absence seems to have been mainly for historical
reasons rather than file contents).
  • Loading branch information
EliahKagan committed Oct 30, 2023
1 parent af1b5d4 commit b970d42
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 15 deletions.
4 changes: 1 addition & 3 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
#
# GitPython documentation build configuration file, created by
# GitPython documentation build configuration file, originally created by
# sphinx-quickstart on Sat Jan 24 11:51:01 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
Expand Down
1 change: 0 additions & 1 deletion git/compat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# compat.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
Expand Down
1 change: 0 additions & 1 deletion git/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/

Expand Down
1 change: 0 additions & 1 deletion test/test_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# test_base.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
Expand Down
1 change: 0 additions & 1 deletion test/test_clone.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/

Expand Down
1 change: 0 additions & 1 deletion test/test_commit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# test_commit.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
Expand Down
1 change: 0 additions & 1 deletion test/test_diff.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# coding: utf-8
# test_diff.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
Expand Down
1 change: 0 additions & 1 deletion test/test_docs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# test_docs.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
Expand Down
1 change: 0 additions & 1 deletion test/test_exc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# test_exc.py
# Copyright (C) 2008, 2009, 2016 Michael Trier (mtrier@gmail.com) and contributors
#
Expand Down
1 change: 0 additions & 1 deletion test/test_git.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# test_git.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
Expand Down
1 change: 0 additions & 1 deletion test/test_index.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# test_index.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
Expand Down
1 change: 0 additions & 1 deletion test/test_repo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# test_repo.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
Expand Down
1 change: 0 additions & 1 deletion test/test_submodule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# This module is part of GitPython and is released under
# the BSD License: https://opensource.org/license/bsd-3-clause/

Expand Down

0 comments on commit b970d42

Please sign in to comment.