Skip to content

Commit

Permalink
Suppressing some lint errors, adding type assignment.
Browse files Browse the repository at this point in the history
  • Loading branch information
cecily_carver committed Dec 19, 2024
1 parent 83672ea commit 412819d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions mysql_mimic/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
class Connection:
_MAX_PREPARED_STMT_ID = 2**32

# pylint: disable=too-many-positional-arguments
def __init__(
self,
stream: MysqlStream,
Expand Down Expand Up @@ -196,6 +197,7 @@ async def handle_change_user(self, data: bytes) -> None:

await self.session.reset()

# pylint: disable=too-many-positional-arguments
async def authenticate(
self,
username: str,
Expand Down
5 changes: 3 additions & 2 deletions mysql_mimic/packets.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class ComFieldList:
wildcard: str


def make_ok(
def make_ok( # pylint: disable=too-many-positional-arguments
capabilities: Capabilities,
status_flags: ServerStatus,
eof: bool = False,
Expand Down Expand Up @@ -170,7 +170,7 @@ def make_error(
return _concat(*parts)


def make_handshake_v10(
def make_handshake_v10( # pylint: disable=too-many-positional-arguments
capabilities: Capabilities,
server_charset: CharacterSet,
server_version: str,
Expand Down Expand Up @@ -338,6 +338,7 @@ def make_column_count(capabilities: Capabilities, column_count: int) -> bytes:


# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
def make_column_definition_41(
server_charset: CharacterSet,
schema: Optional[str] = None,
Expand Down
1 change: 1 addition & 0 deletions mysql_mimic/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ResultColumn:
binary_encoder: Optionally override the function used to encode values for MySQL's binary protocol
"""

# pylint: disable=too-many-positional-arguments
def __init__(
self,
name: str,
Expand Down
2 changes: 1 addition & 1 deletion mysql_mimic/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def like_to_regex(like: str) -> re.Pattern:


def contains_column_metadata(schema: dict, depth: int) -> bool:
sub_dict = schema
sub_dict: Any = schema

# Find the innermost dictionary.
for _ in range(depth - 1):
Expand Down
1 change: 1 addition & 0 deletions mysql_mimic/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class MysqlServer:
**kwargs: extra keyword args passed to the asyncio start server command
"""

# pylint: disable=too-many-positional-arguments
def __init__(
self,
session_factory: Callable[[], BaseSession | Awaitable[BaseSession]] = Session,
Expand Down
2 changes: 1 addition & 1 deletion mysql_mimic/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import asyncio
import inspect
import sys
from collections.abc import Iterator
from collections.abc import Iterator # pylint: disable=import-error
import random
from typing import List, TypeVar, AsyncIterable, Iterable, AsyncIterator, cast
import string
Expand Down

0 comments on commit 412819d

Please sign in to comment.