mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 01:51:46 +04:00
Some manual .format() -> f-strings
This commit is contained in:
parent
aefbe71765
commit
9000e9dd41
27 changed files with 133 additions and 173 deletions
|
|
@ -52,11 +52,11 @@ def test_shebang_posix_not_on_path():
|
|||
|
||||
|
||||
def test_shebang_posix_on_path(tmpdir):
|
||||
tmpdir.join('python{}'.format(sys.version_info[0])).ensure()
|
||||
tmpdir.join(f'python{sys.version_info[0]}').ensure()
|
||||
|
||||
with mock.patch.object(sys, 'platform', 'posix'):
|
||||
with mock.patch.object(os, 'defpath', tmpdir.strpath):
|
||||
expected = '#!/usr/bin/env python{}'.format(sys.version_info[0])
|
||||
expected = f'#!/usr/bin/env python{sys.version_info[0]}'
|
||||
assert shebang() == expected
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue