Skip to content

Commit

Permalink
tryna make pre-commit happy
Browse files Browse the repository at this point in the history
  • Loading branch information
btschwertfeger committed Dec 6, 2023
1 parent a812c47 commit 9ba6f73
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 17 deletions.
11 changes: 4 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
# GitHub: https://github.com/btschwertfeger
#

default_language_version:
python: "3.11"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-yaml
- id: check-json
Expand Down Expand Up @@ -55,7 +52,7 @@ repos:
args:
- --profile=black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.1
rev: v0.1.7
hooks:
- id: ruff
args:
Expand All @@ -71,7 +68,7 @@ repos:
- --show-source
- --statistics
- repo: https://github.com/pycqa/pylint
rev: v2.17.7
rev: v3.0.1
hooks:
- id: pylint
name: pylint
Expand All @@ -81,7 +78,7 @@ repos:
- --rcfile=pyproject.toml
- -d=R0801 # ignore duplicate code
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.7.1
hooks:
- id: mypy
name: mypy
Expand Down
2 changes: 1 addition & 1 deletion kraken/base_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def _request( # noqa: PLR0913 # pylint: disable=too-many-arguments
*,
auth: bool = True,
return_raw: bool = False,
extra_params: Optional[dict] = None,
extra_params: Optional[str | dict] = None,
) -> dict[str, Any] | list[dict[str, Any]] | list[str] | requests.Response:
"""
Handles the requested requests, by sending the request, handling the
Expand Down
4 changes: 2 additions & 2 deletions kraken/futures/trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,15 +511,15 @@ def get_orders_status(
extra_params=extra_params,
)

def create_order( # pylint: disable=too-many-arguments # noqa: PLR0913
def create_order( # pylint: disable=too-many-arguments # noqa: PLR0913, PLR0917
self: Trade,
orderType: str,
size: str | float,
symbol: str,
side: str,
cliOrdId: Optional[str] = None,
limitPrice: Optional[str | float] = None,
reduceOnly: Optional[bool] = None,
reduceOnly: Optional[bool] = None, # noqa: FBT001
stopPrice: Optional[str | float] = None,
triggerSignal: Optional[str] = None,
trailingStopDeviationUnit: Optional[str] = None,
Expand Down
4 changes: 2 additions & 2 deletions kraken/spot/funding.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def get_recent_deposits_status(
method: Optional[str] = None,
start: Optional[str] = None,
end: Optional[str] = None,
cursor: bool | str = False, # noqa: FBT002
cursor: bool | str = False, # noqa: FBT001, FBT002
*,
extra_params: Optional[dict] = None,
) -> list[dict] | dict:
Expand Down Expand Up @@ -537,7 +537,7 @@ def withdraw_addresses(
aclass: Optional[str] = None,
method: Optional[str] = None,
key: Optional[str] = None,
verified: Optional[bool] = None,
verified: Optional[bool] = None, # noqa: FBT001
*,
extra_params: Optional[dict] = None,
) -> dict:
Expand Down
6 changes: 3 additions & 3 deletions kraken/spot/trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __enter__(self: Self) -> Self:
return self

@ensure_string("oflags")
def create_order( # pylint: disable=too-many-branches,too-many-arguments # noqa: PLR0913 PLR0912
def create_order( # pylint: disable=too-many-branches,too-many-arguments # noqa: PLR0912, PLR0913, PLR0917
self: Trade,
ordertype: str,
side: str,
Expand Down Expand Up @@ -443,7 +443,7 @@ def create_order_batch(
)

@ensure_string("oflags")
def edit_order( # pylint: disable=too-many-arguments # noqa: PLR0913
def edit_order( # pylint: disable=too-many-arguments # noqa: PLR0913, PLR0917
self: Trade,
txid: str,
pair: str,
Expand All @@ -452,7 +452,7 @@ def edit_order( # pylint: disable=too-many-arguments # noqa: PLR0913
price2: Optional[str | float] = None,
oflags: Optional[str] = None,
deadline: Optional[str] = None,
cancel_response: Optional[bool] = None,
cancel_response: Optional[bool] = None, # noqa: FBT001
userref: Optional[int] = None,
*,
truncate: bool = False,
Expand Down
4 changes: 2 additions & 2 deletions kraken/spot/websocket_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def private_channel_names(self: KrakenSpotWSClientV1) -> list[str]:
return ["ownTrades", "openOrders"]

@ensure_string("oflags")
async def create_order( # pylint: disable=too-many-arguments # noqa: PLR0913
async def create_order( # pylint: disable=too-many-arguments # noqa: PLR0913, PLR0917
self: KrakenSpotWSClientV1,
ordertype: str,
side: str,
Expand Down Expand Up @@ -547,7 +547,7 @@ async def create_order( # pylint: disable=too-many-arguments # noqa: PLR0913
await self.send_message(message=payload, private=True)

@ensure_string("oflags")
async def edit_order( # pylint: disable=too-many-arguments # noqa: PLR0913
async def edit_order( # pylint: disable=too-many-arguments # noqa: PLR0913, PLR0917
self: KrakenSpotWSClientV1,
orderid: str,
reqid: Optional[str | int] = None,
Expand Down

0 comments on commit 9ba6f73

Please sign in to comment.