mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Clean up calls to .encode() / .decode()
This commit is contained in:
parent
b2faf339ce
commit
aefbe71765
11 changed files with 17 additions and 18 deletions
|
|
@ -249,7 +249,7 @@ class Fixture:
|
|||
|
||||
def get(self):
|
||||
"""Get the output assuming it was written as UTF-8 bytes"""
|
||||
return self.get_bytes().decode('UTF-8')
|
||||
return self.get_bytes().decode()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ def test_file_doesnt_exist():
|
|||
|
||||
def test_simple_case(tmpdir):
|
||||
x = tmpdir.join('f')
|
||||
x.write_text('#!/usr/bin/env echo', encoding='UTF-8')
|
||||
x.write('#!/usr/bin/env echo')
|
||||
make_executable(x.strpath)
|
||||
assert parse_shebang.parse_filename(x.strpath) == ('echo',)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue