Showing 8 of 8 total issues
File pairs.py
has 498 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from .structs import Pair
AAVE_BTC = Pair("AAVE_BTC", price_precision=7, quantity_precision=3)
AAVE_USD = Pair("AAVE_USD", price_precision=3, quantity_precision=3)
AAVE_USDT = Pair("AAVE_USDT", price_precision=3, quantity_precision=3)
File private.py
has 391 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import asyncio
from typing import Dict, List
from .api import ApiError, ApiProvider
from .market import Exchange
File structs.py
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import time
import typing as TP
from dataclasses import dataclass
from datetime import datetime
from enum import Enum, IntEnum
File coins.py
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from .structs import Coin
AAVE = Coin("AAVE")
ACA = Coin("ACA")
ACH = Coin("ACH")
Function __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def __init__(
self,
*,
api_key="",
api_secret="",
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_limiter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def get_limiter(self, path):
if path in self.rate_limiters.keys():
return self.rate_limiters[path]
else:
if path.startswith("private"):
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"