mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-13 12:30:08 -06:00
14 lines
379 B
Python
14 lines
379 B
Python
from __future__ import unicode_literals
|
|
|
|
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))
|