Fix docstrings
This commit is contained in:
parent
a77c6b81f7
commit
b7bc919608
1 changed files with 2 additions and 4 deletions
|
@ -97,15 +97,13 @@ class Section(object):
|
||||||
"}}").format(self=self)
|
"}}").format(self=self)
|
||||||
|
|
||||||
def __bool__(self):
|
def __bool__(self):
|
||||||
"""Magic method to compare sections with =. section_id, name and
|
"""bool(Section) returns True if section_id, name and section_type are set."""
|
||||||
section_type must be set and be identical."""
|
|
||||||
return (self.section_id is not None and
|
return (self.section_id is not None and
|
||||||
self.name is not None and
|
self.name is not None and
|
||||||
self.section_type is not None)
|
self.section_type is not None)
|
||||||
|
|
||||||
def __eq__(self, section):
|
def __eq__(self, section):
|
||||||
"""Sections compare equal if their section_id, name and plex_type (first
|
"""Sections compare equal if their section_id, name and plex_type (first prio) OR section_type (if there is no plex_type is set) compare equal.
|
||||||
prio) OR section_type (if there is no plex_type is set) compare equal.
|
|
||||||
"""
|
"""
|
||||||
return (self.section_id == section.section_id and
|
return (self.section_id == section.section_id and
|
||||||
self.name == section.name and
|
self.name == section.name and
|
||||||
|
|
Loading…
Reference in a new issue