File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 11"""Contextual view module."""
2+
23from . import models
34import six
45
@@ -21,11 +22,11 @@ def validate(mcs, bases):
2122 """Check attributes."""
2223 if bases [0 ] is object :
2324 return None
24- mcs .chk_model_cls ()
25- mcs .chk_incl_excl ()
25+ mcs .check_model_cls ()
26+ mcs .check_include_exclude ()
2627
2728 @classmethod
28- def chk_model_cls (mcs ):
29+ def check_model_cls (mcs ):
2930 """Check __model_cls__ attribute."""
3031 model_cls = mcs .attributes .get ('__model_cls__' )
3132 if model_cls is None :
@@ -36,7 +37,7 @@ def chk_model_cls(mcs):
3637 "DomainModel." )
3738
3839 @classmethod
39- def chk_incl_excl (mcs ):
40+ def check_include_exclude (mcs ):
4041 """Check __include__ and __exclude__ attributes."""
4142 include = mcs .attributes .get ('__include__' , tuple ())
4243 exclude = mcs .attributes .get ('__exclude__' , tuple ())
@@ -109,8 +110,8 @@ def get_properties(mcs):
109110
110111 :rtype: list
111112 """
112- return [key for key , value in six .iteritems (mcs .attributes ) if
113- isinstance (value , property )]
113+ return [key for key , value in six .iteritems (mcs .attributes )
114+ if isinstance (value , property )]
114115
115116
116117@six .add_metaclass (ContextViewMetaClass )
Original file line number Diff line number Diff line change 11"""ContextViews tests."""
2+
23import datetime
34
45import unittest2 as unittest
You can’t perform that action at this time.
0 commit comments