Skip to content

Commit 0633e10

Browse files
Minor tweaks for PEP 8 compliance.
1 parent cfa2750 commit 0633e10

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

samples/bulk_aq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
print("\nDequeuing messages...")
6767
batch_size = 8
6868
while True:
69-
messages = queue.deqMany(batch_size)
69+
messages = queue.deqmany(batch_size)
7070
if not messages:
7171
break
7272
for props in messages:

samples/cqn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def callback(message):
6060
print("--> Timeout:", sub.timeout)
6161
print("--> Operations:", sub.operations)
6262
print("--> Rowids?:", bool(sub.qos & oracledb.SUBSCR_QOS_ROWIDS))
63-
queryId = sub.registerquery("select * from TestTempTable")
64-
print("Registered query:", queryId)
63+
query_id = sub.registerquery("select * from TestTempTable")
64+
print("Registered query:", query_id)
6565

6666
while registered:
6767
print("Waiting for notifications....")

samples/transaction_guard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
connection.commit() # this should fail
6060
sys.exit("Session was not killed. Terminating.")
6161
except oracledb.DatabaseError as e:
62-
errorObj, = e.args
63-
if not errorObj.isrecoverable:
62+
error_obj, = e.args
63+
if not error_obj.isrecoverable:
6464
sys.exit("Session is not recoverable. Terminating.")
6565
ltxid = connection.ltxid
6666
if not ltxid:

samples/type_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def building_in_converter(value):
4848

4949
def building_out_converter(obj):
5050
return Building(int(obj.BUILDINGID), obj.DESCRIPTION, int(obj.NUMFLOORS),
51-
obj.DATEBUILT)
51+
obj.DATEBUILT)
5252

5353

5454
def input_type_handler(cursor, value, num_elements):

test/test_2400_session_pool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
2400 - Module for testing session pools
1212
"""
1313

14-
import test_env
14+
import threading
1515

1616
import cx_Oracle as oracledb
17-
import threading
17+
import test_env
1818

1919
class TestCase(test_env.BaseTestCase):
2020
require_connection = False

0 commit comments

Comments
 (0)