Recommend kwonly args
This commit is contained in:
parent
0644de3472
commit
e68f103e36
|
@ -217,7 +217,7 @@ should be turned into:
|
|||
.. code-block:: python
|
||||
|
||||
class CustomItem(pytest.Item):
|
||||
def __init__(self, additional_arg, **kwargs):
|
||||
def __init__(self, *, additional_arg, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
self.additional_arg = additional_arg
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ class YamlFile(pytest.File):
|
|||
|
||||
|
||||
class YamlItem(pytest.Item):
|
||||
def __init__(self, spec, **kwargs):
|
||||
def __init__(self, *, spec, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
self.spec = spec
|
||||
|
||||
|
|
Loading…
Reference in New Issue