Skip to content

Commit 82ed109

Browse files
Use byte literals instead of .encode()
This is a suggestion from pyupgrade: https://github.com/asottile/pyupgrade#encode-to-bytes-literals Fixed by running `ruff --select UP012 --fix .`: UP012 [*] Unnecessary call to `encode` as UTF-8
1 parent cdc5b45 commit 82ed109

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setuptools/command/sdist.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def _manifest_is_not_generated(self):
189189

190190
with open(self.manifest, 'rb') as fp:
191191
first_line = fp.readline()
192-
return first_line != '# file GENERATED by distutils, do NOT edit\n'.encode()
192+
return first_line != b'# file GENERATED by distutils, do NOT edit\n'
193193

194194
def read_manifest(self):
195195
"""Read the manifest file (named by 'self.manifest') and use it to

0 commit comments

Comments
 (0)