Skip to content

Commit 677a883

Browse files
Apply ruff/pyupgrade rule UP009
UP009 UTF-8 encoding declaration is unnecessary
1 parent 8740ebd commit 677a883

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

doc/source/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
#
31
# CFFI documentation build configuration file, created by
42
# sphinx-quickstart on Thu Jun 14 16:37:47 2012.
53
#

src/cffi/recompiler.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,10 +1315,6 @@ def _print_string_literal_in_array(self, s):
13151315
s = s.encode('utf-8') # -> bytes
13161316
else:
13171317
s.decode('utf-8') # got bytes, check for valid utf-8
1318-
try:
1319-
s.decode('ascii')
1320-
except UnicodeDecodeError:
1321-
s = b'# -*- encoding: utf8 -*-\n' + s
13221318
for line in s.splitlines(True):
13231319
comment = line
13241320
if type('//') is bytes: # python2

0 commit comments

Comments
 (0)