Migrate module docstrings to Google-style format (#10) (#5)

This commit is contained in:
Siegmeyer of Catarina 2018-06-03 15:42:16 +02:00
parent 5ac886e75e
commit 9bf3dbfb5d
11 changed files with 23 additions and 56 deletions

View file

@ -1,6 +1,5 @@
__version__ = '0.9.2'
def register(model_cls, config_cls=None):
from .registry import Registry
Registry.register(model_cls, config_cls)

View file

@ -1,3 +1,5 @@
'''Admin. This module contains classes used for admin integration.'''
from django.contrib import admin
from django.contrib.admin.options import (InlineModelAdmin, ModelAdmin,
StackedInline)

View file

@ -1,5 +1,5 @@
'''
Decorators module.
Decorators.
This module contains pure wrapper functions used as decorators.
Functions in this module should be simple and not involve complex logic.

View file

@ -1,15 +1,9 @@
'''
******
fields
******
Fields.
Contains two custom fields:
* :class:`EavSlugField`
* :class:`EavDatatypeField`
Classes
-------
* :class:`EavSlugField`
* :class:`EavDatatypeField`
'''
import re

View file

@ -1,13 +1,5 @@
'''
#####
forms
#####
'''Forms. This module contains forms used for admin integration.'''
The forms used for admin integration
Classes
-------
'''
from copy import deepcopy
from django.contrib.admin.widgets import AdminSplitDateTime

View file

@ -1,12 +1,9 @@
'''
********
managers
********
Contains the custom manager used by entities registered with eav.
Managers.
Functions and Classes
---------------------
This module contains the custom manager used by entities registered with eav.
'''
from django.db import models
from .queryset import EavQuerySet
@ -14,7 +11,7 @@ from .queryset import EavQuerySet
class EntityManager(models.Manager):
'''
Our custom manager, overriding ``models.Manager``
Our custom manager, overrides ``models.Manager``.
'''
_queryset_class = EavQuerySet

View file

@ -1,21 +1,15 @@
'''
******
models
******
This module defines the four concrete, non-abstract models:
Models.
* :class:`Value`
* :class:`Attribute`
* :class:`EnumValue`
* :class:`EnumGroup`
This module defines the four concrete, non-abstract models:
* :class:`Value`
* :class:`Attribute`
* :class:`EnumValue`
* :class:`EnumGroup`
Along with the :class:`Entity` helper class.
Classes
-------
'''
from django.conf import settings
from django.contrib.contenttypes import fields as generic
from django.contrib.contenttypes.models import ContentType

View file

@ -1,5 +1,5 @@
'''
Queryset module.
Queryset.
This module contains custom EavQuerySet class used for overriding
relational operators and pure functions for rewriting Q-expressions.

View file

@ -1,13 +1,4 @@
'''
########
registry
########
This contains the registry classes
Classes
-------
'''
'''Registry. This modules contains the registry classes.'''
from django.contrib.contenttypes import fields as generic
from django.db.models.signals import post_init, post_save, pre_init, pre_save

View file

@ -1,3 +1,5 @@
'''Utilities. This module contains non-essential helper methods.'''
import sys
from django.db.models import Q

View file

@ -1,7 +1,6 @@
'''
**********
validators
**********
Validtors.
This module contains a validator for each Attribute datatype.
A validator is a callable that takes a value and raises a ``ValidationError``
@ -11,9 +10,6 @@ if it doesnt meet some criteria. (see
These validators are called by the
:meth:`~eav.models.Attribute.validate_value` method in the
:class:`~eav.models.Attribute` model.
Functions
---------
'''
import datetime