Skip to content

Commit

Permalink
Field: rename is_oid to oid.
Browse files Browse the repository at this point in the history
  • Loading branch information
b6d committed Nov 15, 2014
1 parent 0939f80 commit 5dcd260
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lima/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ class Field(abc.FieldABC):
val: An optional constant value for the field.
is_oid: If ``True``, marks this field as a field whose value can be
used to identify an object. A schema must not end up with more than
one identifier field.
oid: If ``True``, marks this field as a field whose value can be used
to identify an object. A schema must not end up with more than one
identifier field.
.. versionadded:: 0.3
The ``val`` parameter.
.. versionadded:: 0.4
The ``is_oid`` parameter.
The ``oid`` parameter.
:attr:`attr`, :attr:`get` and :attr:`val` are mutually exclusive.
Expand All @@ -43,7 +43,7 @@ class Field(abc.FieldABC):
instance.
'''
def __init__(self, *, attr=None, get=None, val=None, is_oid=False):
def __init__(self, *, attr=None, get=None, val=None, oid=False):
if sum(v is not None for v in (attr, get, val)) > 1:
raise ValueError('attr, get and val are mutually exclusive.')

Expand All @@ -59,7 +59,7 @@ def __init__(self, *, attr=None, get=None, val=None, is_oid=False):
elif val is not None:
self.val = val

self.is_oid = is_oid
self.oid = oid


class Boolean(Field):
Expand Down

0 comments on commit 5dcd260

Please sign in to comment.