-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SONARPY-2415 Add stubs for pymsql, mysql and pgdb
- Loading branch information
1 parent
63e9286
commit e738b08
Showing
16 changed files
with
155 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
8 changes: 8 additions & 0 deletions
8
python-frontend/typeshed_serializer/resources/custom/mysql/connector/__init__.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from .connection import MySQLConnection | ||
from .cursor import MySQLCursor | ||
|
||
def connect(dsn: str | None = None, | ||
user: str | None = None, password: str | None = None, | ||
host: str | None = None, database: str | None = None, | ||
**kwargs: Any) -> MySQLConnection: | ||
... |
4 changes: 4 additions & 0 deletions
4
python-frontend/typeshed_serializer/resources/custom/mysql/connector/connection.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from .cursor import MySQLCursor | ||
class MySQLConnection: | ||
def cursor(self) -> MySQLCursor: | ||
... |
9 changes: 9 additions & 0 deletions
9
python-frontend/typeshed_serializer/resources/custom/mysql/connector/cursor.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from typing import Sequence, Union | ||
class MySQLCursor: | ||
def execute(self, operation: str, parameters: Union[Sequence, None] = None | ||
): # should return Cursor | ||
... | ||
|
||
def executemany(self, operation: str, | ||
seq_of_parameters: Sequence[Union[Sequence, None]]): # should return Cursor | ||
... |
3 changes: 3 additions & 0 deletions
3
python-frontend/typeshed_serializer/resources/custom/pgdb/__init__.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from .connect import connect | ||
from .connection import Connection | ||
from .cursor import Cursor |
8 changes: 8 additions & 0 deletions
8
python-frontend/typeshed_serializer/resources/custom/pgdb/connect.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from .connection import Connection | ||
|
||
|
||
def connect(dsn: str | None = None, | ||
user: str | None = None, password: str | None = None, | ||
host: str | None = None, database: str | None = None, | ||
**kwargs: Any) -> Connection: | ||
... |
4 changes: 4 additions & 0 deletions
4
python-frontend/typeshed_serializer/resources/custom/pgdb/connection.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from .cursor import Cursor | ||
class Connection: | ||
def cursor(self) -> Cursor: | ||
... |
9 changes: 9 additions & 0 deletions
9
python-frontend/typeshed_serializer/resources/custom/pgdb/cursor.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from typing import Sequence, Union | ||
class Cursor: | ||
def execute(self, operation: str, parameters: Union[Sequence, None] = None | ||
): # should return Cursor | ||
... | ||
|
||
def executemany(self, operation: str, | ||
seq_of_parameters: Sequence[Union[Sequence, None]]): # should return Cursor | ||
... |
2 changes: 2 additions & 0 deletions
2
python-frontend/typeshed_serializer/resources/custom/pymysql/__init__.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from .connections import Connection, connect | ||
from .cursors import Cursor |
11 changes: 11 additions & 0 deletions
11
python-frontend/typeshed_serializer/resources/custom/pymysql/connections.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from .cursors import Cursor | ||
|
||
class Connection: | ||
def cursor(self) -> Cursor: | ||
... | ||
|
||
def connect(dsn: str | None = None, | ||
user: str | None = None, password: str | None = None, | ||
host: str | None = None, database: str | None = None, | ||
**kwargs: Any) -> Connection: | ||
... |
9 changes: 9 additions & 0 deletions
9
python-frontend/typeshed_serializer/resources/custom/pymysql/cursors.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from typing import Sequence, Union | ||
class Cursor: | ||
def execute(self, operation: str, parameters: Union[Sequence, None] = None | ||
): # should return Cursor | ||
... | ||
|
||
def executemany(self, operation: str, | ||
seq_of_parameters: Sequence[Union[Sequence, None]]): # should return Cursor | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters