From 1d59c5cb1326ad9418c3d82aee16fa7cd85651ac Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Wed, 28 Jun 2023 13:28:11 +0300 Subject: [PATCH] Bump PyMySQL to `1.1.*` (#10376) --- stubs/PyMySQL/METADATA.toml | 2 +- stubs/PyMySQL/pymysql/charset.pyi | 4 ++-- stubs/PyMySQL/pymysql/connections.pyi | 9 ++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/stubs/PyMySQL/METADATA.toml b/stubs/PyMySQL/METADATA.toml index b9b1827ff..b4f31a779 100644 --- a/stubs/PyMySQL/METADATA.toml +++ b/stubs/PyMySQL/METADATA.toml @@ -1,4 +1,4 @@ -version = "1.0.*" +version = "1.1.*" partial_stub = true [tool.stubtest] diff --git a/stubs/PyMySQL/pymysql/charset.pyi b/stubs/PyMySQL/pymysql/charset.pyi index 0a36fa695..21d211fbc 100644 --- a/stubs/PyMySQL/pymysql/charset.pyi +++ b/stubs/PyMySQL/pymysql/charset.pyi @@ -3,8 +3,8 @@ from typing import Any MBLENGTH: Any class Charset: - is_default: Any - def __init__(self, id, name, collation, is_default): ... + is_default: bool + def __init__(self, id, name, collation, is_default: bool = False) -> None: ... class Charsets: def add(self, c): ... diff --git a/stubs/PyMySQL/pymysql/connections.pyi b/stubs/PyMySQL/pymysql/connections.pyi index a70a23091..8564d19f1 100644 --- a/stubs/PyMySQL/pymysql/connections.pyi +++ b/stubs/PyMySQL/pymysql/connections.pyi @@ -63,8 +63,9 @@ class Connection(Generic[_C]): password: Any db: Any unix_socket: Any + charset: str + collation: str | None bind_address: Any - charset: Any use_unicode: Any client_flag: Any cursorclass: Any @@ -88,6 +89,7 @@ class Connection(Generic[_C]): port: int = 0, unix_socket: Incomplete | None = None, charset: str = "", + collation: str | None = None, sql_mode: Incomplete | None = None, read_default_file: Incomplete | None = None, conv=None, @@ -119,7 +121,7 @@ class Connection(Generic[_C]): binary_prefix: bool | None = False, program_name: Incomplete | None = None, server_public_key: bytes | None = None, - ): ... + ) -> None: ... @overload def __init__( self: Connection[_C], # different between overloads @@ -131,6 +133,7 @@ class Connection(Generic[_C]): port: int = 0, unix_socket: Incomplete | None = None, charset: str = "", + collation: str | None = None, sql_mode: Incomplete | None = None, read_default_file: Incomplete | None = None, conv=None, @@ -162,7 +165,7 @@ class Connection(Generic[_C]): binary_prefix: bool | None = False, program_name: Incomplete | None = None, server_public_key: bytes | None = None, - ): ... + ) -> None: ... socket: Any rfile: Any wfile: Any