mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-23 17:27:25 +00:00
pylint cleanup
This commit is contained in:
parent
264e6744e1
commit
320ad717cd
2 changed files with 1 additions and 8 deletions
|
@ -1,7 +1,5 @@
|
||||||
from zope.interface import implementer
|
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|
||||||
from lbrynet.interfaces import IBlobPriceModel
|
|
||||||
from lbrynet.extras.daemon import conf
|
from lbrynet.extras.daemon import conf
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +26,6 @@ class MeanAvailabilityWeightedPrice:
|
||||||
blob_tracker (BlobAvailabilityTracker): blob availability tracker
|
blob_tracker (BlobAvailabilityTracker): blob availability tracker
|
||||||
|
|
||||||
"""
|
"""
|
||||||
implementer(IBlobPriceModel)
|
|
||||||
|
|
||||||
def __init__(self, tracker, base_price=None, alpha=1.0):
|
def __init__(self, tracker, base_price=None, alpha=1.0):
|
||||||
self.blob_tracker = tracker
|
self.blob_tracker = tracker
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
from zope.interface import implementer
|
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from lbrynet.extras.daemon import conf
|
from lbrynet.extras.daemon import conf
|
||||||
from lbrynet.interfaces import INegotiationStrategy
|
|
||||||
from lbrynet.p2p.Offer import Offer
|
from lbrynet.p2p.Offer import Offer
|
||||||
from lbrynet.p2p.PriceModel import MeanAvailabilityWeightedPrice, ZeroPrice
|
from lbrynet.p2p.PriceModel import MeanAvailabilityWeightedPrice, ZeroPrice
|
||||||
|
|
||||||
|
@ -14,7 +12,6 @@ class Strategy:
|
||||||
"""
|
"""
|
||||||
Base for negotiation strategies
|
Base for negotiation strategies
|
||||||
"""
|
"""
|
||||||
implementer(INegotiationStrategy)
|
|
||||||
|
|
||||||
def __init__(self, price_model, max_rate, min_rate, is_generous=None):
|
def __init__(self, price_model, max_rate, min_rate, is_generous=None):
|
||||||
self.price_model = price_model
|
self.price_model = price_model
|
||||||
|
@ -100,7 +97,6 @@ class BasicAvailabilityWeightedStrategy(Strategy):
|
||||||
accepted or a threshold is reached
|
accepted or a threshold is reached
|
||||||
|
|
||||||
"""
|
"""
|
||||||
implementer(INegotiationStrategy)
|
|
||||||
|
|
||||||
def __init__(self, blob_tracker, acceleration=1.25,
|
def __init__(self, blob_tracker, acceleration=1.25,
|
||||||
deceleration=0.9, max_rate=None,
|
deceleration=0.9, max_rate=None,
|
||||||
|
@ -137,7 +133,7 @@ class BasicAvailabilityWeightedStrategy(Strategy):
|
||||||
|
|
||||||
|
|
||||||
class OnlyFreeStrategy(Strategy):
|
class OnlyFreeStrategy(Strategy):
|
||||||
implementer(INegotiationStrategy)
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
price_model = ZeroPrice()
|
price_model = ZeroPrice()
|
||||||
super().__init__(price_model, 0.0, 0.0, True)
|
super().__init__(price_model, 0.0, 0.0, True)
|
||||||
|
|
Loading…
Add table
Reference in a new issue