Skip to content

Commit 12eb51d

Browse files
committed
Fix typing and linting issues
Change-Id: I7e8e55b0a4d9160be5365ef22306b97dcf9e427a
1 parent 0a29791 commit 12eb51d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lib/mysql/connector/abstracts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ def connect(self, **kwargs: Any) -> None:
12631263
self.set_charset_collation(charset=self._charset_id)
12641264

12651265
# go back to sandbox mode.
1266-
self.cmd_query(f"ALTER USER CURRENT_USER() PASSWORD EXPIRE")
1266+
self.cmd_query("ALTER USER CURRENT_USER() PASSWORD EXPIRE")
12671267

12681268
def reconnect(self, attempts: int = 1, delay: int = 0) -> None:
12691269
"""Attempt to reconnect to the MySQL server

lib/mysql/connector/constants.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -721,9 +721,7 @@ class CharacterSet:
721721

722722
def __init__(self) -> None:
723723
# Use LTS character set as default
724-
self._desc: List[
725-
Optional[Tuple[str, str, bool]]
726-
] = MYSQL_CHARACTER_SETS_57 # type: ignore[assignment]
724+
self._desc: List[Optional[Tuple[str, str, bool]]] = MYSQL_CHARACTER_SETS_57
727725
self._mysql_version: Tuple[int, ...] = (5, 7)
728726

729727
def set_mysql_version(self, version: Tuple[int, ...]) -> None:
@@ -736,7 +734,7 @@ def set_mysql_version(self, version: Tuple[int, ...]) -> None:
736734
if self._mysql_version >= (8, 0):
737735
self._desc = MYSQL_CHARACTER_SETS
738736

739-
def get_info(self, setid: int) -> Tuple[str, str]: # type: ignore[override]
737+
def get_info(self, setid: int) -> Tuple[str, str]:
740738
"""Retrieves character set information as tuple using an ID
741739
742740
Retrieves character set and collation information based on the
@@ -751,7 +749,7 @@ def get_info(self, setid: int) -> Tuple[str, str]: # type: ignore[override]
751749
except IndexError:
752750
raise ProgrammingError(f"Character set '{setid}' unsupported") from None
753751

754-
def get_desc(self, name: int) -> str: # type: ignore[override]
752+
def get_desc(self, name: int) -> str:
755753
"""Retrieves character set information as string using an ID
756754
757755
Retrieves character set and collation information based on the

0 commit comments

Comments
 (0)