mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 13:37:17 +02:00
PEP8 cleanup of the entire codebase. Unchanged are many cases of too-long lines, partly because of the rewrite they would require but also because splitting many lines up would make the code harder to read. Also the third-party libraries (idmapper, prettytable etc) were not cleaned.
This commit is contained in:
parent
30b7d2a405
commit
1ae17bcbe4
154 changed files with 5613 additions and 4054 deletions
|
|
@ -5,6 +5,7 @@ from django.db import models
|
|||
from src.utils import logger, utils
|
||||
__all__ = ("HelpEntryManager",)
|
||||
|
||||
|
||||
class HelpEntryManager(models.Manager):
|
||||
"""
|
||||
This HelpEntryManager implements methods for searching
|
||||
|
|
@ -48,7 +49,7 @@ class HelpEntryManager(models.Manager):
|
|||
Do a fuzzy match, preferably within the category of the
|
||||
current topic.
|
||||
"""
|
||||
return self.filter(db_key__icontains=topicstring).exclude(db_key__iexact=topicstring)
|
||||
return self.filter(db_key__icontains=topicstr).exclude(db_key__iexact=topicstr)
|
||||
|
||||
def find_topics_with_category(self, help_category):
|
||||
"""
|
||||
|
|
@ -92,6 +93,7 @@ class HelpEntryManager(models.Manager):
|
|||
"""
|
||||
ostring = ostring.strip().lower()
|
||||
if help_category:
|
||||
return self.filter(db_key__iexact=ostring, db_help_category__iexact=help_category)
|
||||
return self.filter(db_key__iexact=ostring,
|
||||
db_help_category__iexact=help_category)
|
||||
else:
|
||||
return self.filter(db_key__iexact=ostring)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue