Make PEP8 cleanup of line spaces and character distances as well as indents

This commit is contained in:
Griatch 2017-08-19 23:16:36 +02:00
parent 7ff783fea1
commit b278337172
189 changed files with 2039 additions and 1583 deletions

View file

@ -8,12 +8,12 @@ from django.contrib import admin
from evennia.help.models import HelpEntry
from evennia.typeclasses.admin import TagInline
class HelpTagInline(TagInline):
model = HelpEntry.db_tags.through
related_field = "helpentry"
class HelpEntryForm(forms.ModelForm):
"Defines how to display the help entry"
class Meta(object):
@ -22,8 +22,9 @@ class HelpEntryForm(forms.ModelForm):
db_help_category = forms.CharField(label="Help category", initial='General',
help_text="organizes help entries in lists")
db_lock_storage = forms.CharField(label="Locks", initial='view:all()',required=False,
widget=forms.TextInput(attrs={'size':'40'}),)
db_lock_storage = forms.CharField(label="Locks", initial='view:all()', required=False,
widget=forms.TextInput(attrs={'size': '40'}),)
class HelpEntryAdmin(admin.ModelAdmin):
"Sets up the admin manaager for help entries"
@ -38,9 +39,9 @@ class HelpEntryAdmin(admin.ModelAdmin):
form = HelpEntryForm
fieldsets = (
(None, {'fields':(('db_key', 'db_help_category'),
(None, {'fields': (('db_key', 'db_help_category'),
'db_entrytext', 'db_lock_storage'),
'description':"Sets a Help entry. Set lock to <i>view:all()</I> unless you want to restrict it."}),)
'description': "Sets a Help entry. Set lock to <i>view:all()</I> unless you want to restrict it."}),)
admin.site.register(HelpEntry, HelpEntryAdmin)

View file

@ -24,6 +24,7 @@ class HelpEntryManager(TypedObjectManager):
search_help (equivalent to evennia.search_helpentry)
"""
def find_topicmatch(self, topicstr, exact=False):
"""
Searches for matching topics or aliases based on player's

View file

@ -52,14 +52,14 @@ class HelpEntry(SharedMemoryModel):
db_key = models.CharField('help key', max_length=255, unique=True, help_text='key to search for')
# help category
db_help_category = models.CharField("help category", max_length=255, default="General",
help_text='organizes help entries in lists')
help_text='organizes help entries in lists')
# the actual help entry text, in any formatting.
db_entrytext = models.TextField('help entry', blank=True, help_text='the main body of help text')
# lock string storage
db_lock_storage = models.TextField('locks', blank=True, help_text='normally view:all().')
# tags are primarily used for permissions
db_tags = models.ManyToManyField(Tag, blank=True,
help_text='tags on this object. Tags are simple string markers to identify, group and alias objects.')
help_text='tags on this object. Tags are simple string markers to identify, group and alias objects.')
# (deprecated, only here to allow MUX helpfile load (don't use otherwise)).
# TODO: remove this when not needed anymore.
db_staff_only = models.BooleanField(default=False)