Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Graeme22 committed Nov 15, 2023
1 parent 14036bb commit 1b778a4
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
28 changes: 23 additions & 5 deletions tastytrade/watchlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ class PairsWatchlist(TastytradeJsonDataclass): # pragma: no cover
pairs_equations: List[Pair]

@classmethod
def get_pairs_watchlists(cls, session: ProductionSession) -> List['PairsWatchlist']:
def get_pairs_watchlists(
cls,
session: ProductionSession
) -> List['PairsWatchlist']:
"""
Fetches a list of all Tastytrade public pairs watchlists.
Expand Down Expand Up @@ -106,7 +109,11 @@ def get_public_watchlists(
return [cls(**entry) for entry in data]

@classmethod
def get_public_watchlist(cls, session: ProductionSession, name: str) -> 'Watchlist':
def get_public_watchlist(
cls,
session: ProductionSession,
name: str
) -> 'Watchlist':
"""
Fetches a Tastytrade public watchlist by name.
Expand All @@ -126,7 +133,10 @@ def get_public_watchlist(cls, session: ProductionSession, name: str) -> 'Watchli
return cls(**data)

@classmethod
def get_private_watchlists(cls, session: ProductionSession) -> List['Watchlist']:
def get_private_watchlists(
cls,
session: ProductionSession
) -> List['Watchlist']:
"""
Fetches a the user's private watchlists.
Expand All @@ -145,7 +155,11 @@ def get_private_watchlists(cls, session: ProductionSession) -> List['Watchlist']
return [cls(**entry) for entry in data]

@classmethod
def get_private_watchlist(cls, session: ProductionSession, name: str) -> 'Watchlist':
def get_private_watchlist(
cls,
session: ProductionSession,
name: str
) -> 'Watchlist':
"""
Fetches a user's watchlist by name.
Expand All @@ -165,7 +179,11 @@ def get_private_watchlist(cls, session: ProductionSession, name: str) -> 'Watchl
return cls(**data)

@classmethod
def remove_private_watchlist(cls, session: ProductionSession, name: str) -> None:
def remove_private_watchlist(
cls,
session: ProductionSession,
name: str
) -> None:
"""
Deletes the named private watchlist.
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os

import pytest

from tastytrade import CertificationSession
Expand Down
4 changes: 3 additions & 1 deletion tests/test_account.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from decimal import Decimal

import pytest

from tastytrade import Account
from tastytrade.instruments import Equity
from tastytrade.order import NewOrder, OrderAction, OrderTimeInForce, OrderType, PriceEffect
from tastytrade.order import (NewOrder, OrderAction, OrderTimeInForce,
OrderType, PriceEffect)


@pytest.fixture
Expand Down
6 changes: 5 additions & 1 deletion tests/test_instruments.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
from tastytrade.instruments import Cryptocurrency, Equity, FutureProduct, FutureOptionProduct, Option, NestedOptionChain, Warrant, get_quantity_decimal_precisions, get_option_chain
from tastytrade.instruments import (Cryptocurrency, Equity,
FutureOptionProduct, FutureProduct,
NestedOptionChain, Option, Warrant,
get_option_chain,
get_quantity_decimal_precisions)


def test_get_cryptocurrency(session):
Expand Down
1 change: 0 additions & 1 deletion tests/test_streamer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import asyncio
import pytest
import pytest_asyncio

Expand Down

0 comments on commit 1b778a4

Please sign in to comment.