Skip to content

Commit

Permalink
fix (shared_structure): added docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sieboldianus committed Jan 5, 2019
1 parent d4fdb01 commit e26bc35
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions lbsntransform/classes/shared_structure_proto_lbsndb.py
Expand Up @@ -231,6 +231,12 @@ def prepare_lbsn_relation(self, record):


class PlaceAttrShared():
"""Shared structure for Place Attributes
Contains attributes shared among PG DB and LBSN ProtoBuf spec.
Note that Country, City and Place have the same structure.
"""

def __init__(self, record=None):
if record is None:
record = lbsnPlace() # init empty structure
Expand All @@ -248,6 +254,11 @@ def __init__(self, record=None):


class UserAttrShared():
"""Shared structure for User Attributes
Contains attributes shared among PG DB and LBSN ProtoBuf spec.
"""

def __init__(self, record=None):
if record is None:
record = lbsnUser()
Expand Down Expand Up @@ -276,6 +287,11 @@ def __init__(self, record=None):


class UsergroupAttrShared():
"""Shared structure for Usergroup Attributes
Contains attributes shared among PG DB and LBSN ProtoBuf spec.
"""

def __init__(self, record=None):
if record is None:
record = lbsnUserGroup()
Expand All @@ -291,6 +307,11 @@ def __init__(self, record=None):


class PostAttrShared():
"""Shared structure for Post Attributes
Contains attributes shared among PG DB and LBSN ProtoBuf spec.
"""

def __init__(self, record=None):
if record is None:
record = lbsnPost()
Expand Down Expand Up @@ -328,6 +349,11 @@ def __init__(self, record=None):


class PostreactionAttrShared():
"""Shared structure for Postreaction Attributes
Contains attributes shared among PG DB and LBSN ProtoBuf spec.
"""

def __init__(self, record=None):
if record is None:
record = lbsnPostReaction()
Expand All @@ -348,6 +374,11 @@ def __init__(self, record=None):


class RelationAttrShared():
"""Shared structure for Relation Attributes
Contains attributes shared among PG DB and LBSN ProtoBuf spec.
"""

def __init__(self, relationship=None):
if relationship is None:
relationship = lbsnRelationship()
Expand Down

0 comments on commit e26bc35

Please sign in to comment.