Skip to content

Commit 1317ae2

Browse files
committed
Python: Rename cursor => Cursor in PEP249
Notice that since this will be part of the same PR as 5cfc433, it is OK to do this change without keeping `PEP249::cursor` for backwards compatibility.
1 parent d8db83d commit 1317ae2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

python/ql/src/semmle/python/frameworks/PEP249.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ deprecated class PEP249ModuleApiNode = PEP249::PEP249ModuleApiNode;
2828
deprecated module Connection = PEP249::Connection;
2929

3030
/**
31-
* DEPRECATED: Use `PEP249::cursor` instead.
31+
* DEPRECATED: Use `PEP249::Cursor` instead.
3232
*/
33-
deprecated module cursor = PEP249::cursor;
33+
deprecated module cursor = PEP249::Cursor;
3434

3535
/**
3636
* DEPRECATED: Use `PEP249::execute` instead.

python/ql/src/semmle/python/frameworks/internal/PEP249Impl.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module PEP249 {
7878
* These are are returned by the `cursor` method on a database connection.
7979
* See https://www.python.org/dev/peps/pep-0249/#cursor.
8080
*/
81-
module cursor {
81+
module Cursor {
8282
/**
8383
* A source of database cursors (following PEP 249), extend this class to model new instances.
8484
*
@@ -148,7 +148,7 @@ module PEP249 {
148148
*/
149149
private DataFlow::LocalSourceNode execute(DataFlow::TypeTracker t) {
150150
t.startInAttr("execute") and
151-
result in [cursor::instance(), Connection::instance()]
151+
result in [Cursor::instance(), Connection::instance()]
152152
or
153153
exists(DataFlow::TypeTracker t2 | result = execute(t2).track(t2, t))
154154
}

0 commit comments

Comments
 (0)