Skip to content

Commit 96ca45c

Browse files
committed
Cleanup
1 parent cd8255f commit 96ca45c

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

flaskext/sqlalchemy.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import time
1515
import sqlalchemy
1616
from math import ceil
17-
from types import MethodType
1817
from functools import partial
1918
from flask import _request_ctx_stack, abort
2019
from flask.signals import Namespace
@@ -466,31 +465,31 @@ def create_app():
466465
class User(db.Model):
467466
username = db.Column(db.String(80), unique=True)
468467
pw_hash = db.Column(db.String(80))
469-
468+
470469
You may also define your own SessionExtension instances as well when
471470
defining your SQLAlchemy class instance. You may pass your custom instances
472-
to the `session_extensions` keyword. This can be either a single
471+
to the `session_extensions` keyword. This can be either a single
473472
SessionExtension instance, or a list of SessionExtension instances. In the
474-
following use case we use the VersionedListener from the SQLAlchemy
473+
following use case we use the VersionedListener from the SQLAlchemy
475474
versioning examples.::
476-
475+
477476
from history_meta import VersionedMeta, VersionedListener
478-
477+
479478
app = Flask(__name__)
480479
db = SQLAlchemy(app, session_extensions=[VersionedListener()])
481-
480+
482481
class User(db.Model):
483482
__metaclass__ = VersionedMeta
484483
username = db.Column(db.String(80), unique=True)
485484
pw_hash = db.Column(db.String(80))
486485
"""
487486

488-
def __init__(self, app=None, use_native_unicode=True,
487+
def __init__(self, app=None, use_native_unicode=True,
489488
session_extensions=None):
490489
self.use_native_unicode = use_native_unicode
491490
self.session_extensions = to_list(session_extensions, []) + \
492491
[_SignallingSessionExtension()]
493-
492+
494493
self.session = _create_scoped_session(self)
495494

496495
self.Model = declarative_base(cls=Model, name='Model')

0 commit comments

Comments
 (0)