Skip to content

Commit

Permalink
Refactor more types and fix ruff check warnings
Browse files Browse the repository at this point in the history
Lots of Dict -> dict; List -> list and some other cleanups here and
there.

one of the rules is apparently python style standards say it's illegal
to name a variable 'l' (or i or o), so may as well fix it just so the
warning goes away too.
  • Loading branch information
mattsta committed Sep 20, 2024
1 parent 43343fb commit dab8622
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 133 deletions.
2 changes: 2 additions & 0 deletions ib_async/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@
"FlexError",
"FlexReport",
"IB",
"IBDefaults",
"OrderStateNumeric",
"IBC",
"Watchdog",
"AccountValue",
Expand Down
2 changes: 1 addition & 1 deletion ib_async/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def send(self, *fields, makeEmpty=True):
bool: lambda b: "1" if b else "0",

# Lists of tags become semicolon-appended KV pairs
list: lambda l: "".join([f"{v.tag}={v.value};" for v in l]),
list: lambda lst: "".join([f"{v.tag}={v.value};" for v in lst]),
}
# fmt: on

Expand Down
2 changes: 1 addition & 1 deletion ib_async/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import dataclasses
import logging
from datetime import datetime, timezone
from datetime import datetime
from typing import Any, cast

from .contract import (
Expand Down
Loading

0 comments on commit dab8622

Please sign in to comment.