mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
keyword only arguments in some places
This commit is contained in:
parent
34c3a1580a
commit
5779f93ec6
4 changed files with 17 additions and 20 deletions
|
|
@ -8,12 +8,7 @@ from pre_commit.envcontext import UNSET
|
|||
from pre_commit.envcontext import Var
|
||||
|
||||
|
||||
def _test(**kwargs):
|
||||
before = kwargs.pop('before')
|
||||
patch = kwargs.pop('patch')
|
||||
expected = kwargs.pop('expected')
|
||||
assert not kwargs
|
||||
|
||||
def _test(*, before, patch, expected):
|
||||
env = before.copy()
|
||||
with envcontext(patch, _env=env):
|
||||
assert env == expected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue