Skip to content

Commit 14238bf

Browse files
committed
Issue #25: Renaming
1 parent 317a343 commit 14238bf

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

domain_models/views.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Contextual view module."""
2+
23
from . import models
34
import 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)

tests/test_context_view.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""ContextViews tests."""
2+
23
import datetime
34

45
import unittest2 as unittest

0 commit comments

Comments
 (0)