Skip to content

Commit

Permalink
Use byte literals instead of .encode()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DimitriPapadopoulos committed Jan 3, 2024
1 parent cdc5b45 commit 82ed109
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setuptools/command/sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def _manifest_is_not_generated(self):

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

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

0 comments on commit 82ed109

Please sign in to comment.