mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-25 02:08:41 -06:00
Added the useful thinking bit of the autoupdate and tests.
This commit is contained in:
11
testing/auto_namedtuple.py
Normal file
11
testing/auto_namedtuple.py
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
import collections
|
||||
|
||||
def auto_namedtuple(classname='auto_namedtuple', **kwargs):
|
||||
"""Returns an automatic namedtuple object.
|
||||
|
||||
Args:
|
||||
classname - The class name for the returned object.
|
||||
**kwargs - Properties to give the returned object.
|
||||
"""
|
||||
return (collections.namedtuple(classname, kwargs.keys())(**kwargs))
|
||||
4
testing/resources/manifest_without_foo.yaml
Normal file
4
testing/resources/manifest_without_foo.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
- id: bar
|
||||
name: Bar
|
||||
entry: bar
|
||||
language: python
|
||||
Reference in New Issue
Block a user