Run 2to3.
This commit is contained in:
parent
a5a8d9dd57
commit
6fa280b9fd
157 changed files with 976 additions and 976 deletions
|
|
@ -271,7 +271,7 @@ class ChannelHandler(object):
|
|||
if channelname:
|
||||
channel = self._cached_channels.get(channelname.lower(), None)
|
||||
return [channel] if channel else []
|
||||
return self._cached_channels.values()
|
||||
return list(self._cached_channels.values())
|
||||
|
||||
def get_cmdset(self, source_object):
|
||||
"""
|
||||
|
|
@ -292,7 +292,7 @@ class ChannelHandler(object):
|
|||
else:
|
||||
# create a new cmdset holding all viable channels
|
||||
chan_cmdset = None
|
||||
chan_cmds = [channelcmd for channel, channelcmd in self._cached_channel_cmds.iteritems()
|
||||
chan_cmds = [channelcmd for channel, channelcmd in self._cached_channel_cmds.items()
|
||||
if channel.subscriptions.has(source_object) and
|
||||
channelcmd.access(source_object, 'send')]
|
||||
if chan_cmds:
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ class DefaultChannel(with_metaclass(TypeclassBase, ChannelDB)):
|
|||
|
||||
"""
|
||||
senders = make_iter(senders) if senders else []
|
||||
if isinstance(msgobj, basestring):
|
||||
if isinstance(msgobj, str):
|
||||
# given msgobj is a string - convert to msgobject (always TempMsg)
|
||||
msgobj = TempMsg(senders=senders, header=header, message=msgobj, channels=[self])
|
||||
# we store the logging setting for use in distribute_message()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ These managers define helper methods for accessing the database from
|
|||
Comm system components.
|
||||
|
||||
"""
|
||||
from __future__ import print_function
|
||||
|
||||
|
||||
from django.db.models import Q
|
||||
from evennia.typeclasses.managers import (TypedObjectManager, TypeclassManager)
|
||||
|
|
@ -43,9 +43,9 @@ def dbref(inp, reqhash=True):
|
|||
dbref, otherwise `None`.
|
||||
|
||||
"""
|
||||
if reqhash and not (isinstance(inp, basestring) and inp.startswith("#")):
|
||||
if reqhash and not (isinstance(inp, str) and inp.startswith("#")):
|
||||
return None
|
||||
if isinstance(inp, basestring):
|
||||
if isinstance(inp, str):
|
||||
inp = inp.lstrip('#')
|
||||
try:
|
||||
if int(inp) < 0:
|
||||
|
|
@ -77,7 +77,7 @@ def identify_object(inp):
|
|||
return inp, "object"
|
||||
elif clsname == "ChannelDB":
|
||||
return inp, "channel"
|
||||
if isinstance(inp, basestring):
|
||||
if isinstance(inp, str):
|
||||
return inp, "string"
|
||||
elif dbref(inp):
|
||||
return dbref(inp), "dbref"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import models, migrations
|
||||
from django.conf import settings
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.9 on 2016-09-05 09:02
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.9 on 2016-09-21 17:31
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.11 on 2016-12-06 19:12
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.11 on 2017-02-17 20:39
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-06-06 17:31
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-06-17 20:17
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-07-05 17:26
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import migrations, models, connection
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-07-05 17:36
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-07-06 20:41
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
from django.db import migrations, connection
|
||||
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ class Msg(SharedMemoryModel):
|
|||
for sender in make_iter(senders):
|
||||
if not sender:
|
||||
continue
|
||||
if isinstance(sender, basestring):
|
||||
if isinstance(sender, str):
|
||||
self.db_sender_external = sender
|
||||
self.extra_senders.append(sender)
|
||||
self.save(update_fields=["db_sender_external"])
|
||||
|
|
@ -203,7 +203,7 @@ class Msg(SharedMemoryModel):
|
|||
for sender in make_iter(senders):
|
||||
if not sender:
|
||||
continue
|
||||
if isinstance(sender, basestring):
|
||||
if isinstance(sender, str):
|
||||
self.db_sender_external = ""
|
||||
self.save(update_fields=["db_sender_external"])
|
||||
if not hasattr(sender, "__dbclass__"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue