diff options
| author | Federico Caselli <cfederico87@gmail.com> | 2021-11-21 20:36:35 +0100 |
|---|---|---|
| committer | Federico Caselli <cfederico87@gmail.com> | 2021-11-22 15:03:17 +0000 |
| commit | 0b95f0055be252b13e99b0a944466f60b5e367ff (patch) | |
| tree | 6ae4135fd408c4e69582c4f6fa458b007553aeab /examples/custom_attributes | |
| parent | e04baa2953fb5d0d29f5dca01ea6882bf1fa1cd4 (diff) | |
| download | sqlalchemy-0b95f0055be252b13e99b0a944466f60b5e367ff.tar.gz | |
Remove object in class definition
References: #4600
Change-Id: I2a62ddfe00bc562720f0eae700a497495d7a987a
Diffstat (limited to 'examples/custom_attributes')
| -rw-r--r-- | examples/custom_attributes/custom_management.py | 2 | ||||
| -rw-r--r-- | examples/custom_attributes/listen_for_events.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/custom_attributes/custom_management.py b/examples/custom_attributes/custom_management.py index 6cddfe7bd..5ee5a45f8 100644 --- a/examples/custom_attributes/custom_management.py +++ b/examples/custom_attributes/custom_management.py @@ -43,7 +43,7 @@ class MyClassState(InstrumentationManager): return find -class MyClass(object): +class MyClass: __sa_instrumentation_manager__ = MyClassState def __init__(self, **kwargs): diff --git a/examples/custom_attributes/listen_for_events.py b/examples/custom_attributes/listen_for_events.py index e3ef4cbea..b2d2b690b 100644 --- a/examples/custom_attributes/listen_for_events.py +++ b/examples/custom_attributes/listen_for_events.py @@ -27,7 +27,7 @@ if __name__ == "__main__": from sqlalchemy.orm import relationship from sqlalchemy.ext.declarative import declarative_base - class Base(object): + class Base: def receive_change_event(self, verb, key, value, oldvalue): s = "Value '%s' %s on attribute '%s', " % (value, verb, key) if oldvalue: |
