mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Add a docstring
This commit is contained in:
parent
6f535fdba4
commit
add72ef5da
1 changed files with 9 additions and 0 deletions
|
@ -625,6 +625,15 @@ default_costs = {
|
|||
###
|
||||
|
||||
class Facade(object):
|
||||
"""Facade for optput objects
|
||||
|
||||
The main algorithm uses integers (and tiny strings, and sets, dicts,
|
||||
tuples you get the picture...).
|
||||
The rest of the world uses ORM objects.
|
||||
So, all objects that are returned in results have "object ID" attributes
|
||||
ending in an underscore (e.g. pokemon_), and this base class adds
|
||||
underscore-less properties that get the underlying object.
|
||||
"""
|
||||
@property
|
||||
def pokemon(self):
|
||||
return self.search.session.query(tables.Pokemon).filter_by(id=self.pokemon_).one()
|
||||
|
|
Loading…
Reference in a new issue