Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bigspider committed Nov 12, 2020
1 parent 6f03da7 commit 0fd765a
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 19 deletions.
2 changes: 1 addition & 1 deletion teos/appointments_dbm.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AppointmentsDBM(DBManager):
Args:
db_path (:obj:`str`): the path (relative or absolute) to the system folder containing the database. A fresh
database will be created if the specified path does not contain one.
Attributes:
logger (:obj:`Logger <teos.logger.Logger>`): the logger for this component.
Expand Down
4 changes: 2 additions & 2 deletions teos/chain_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def __init__(self, receiving_queues, block_processor, bitcoind_feed_params):

def enqueue(self, block_hash):
"""
Adds a new block hash to the internal queue of the :obj:`ChainMonitor` and the internal state. The state contains
the list of ``last_tips`` to prevent notifying about old blocks. ``last_tips`` is bounded to
Adds a new block hash to the internal queue of the :obj:`ChainMonitor` and the internal state. The state
contains the list of ``last_tips`` to prevent notifying about old blocks. ``last_tips`` is bounded to
``max_block_window_size``.
Args:
Expand Down
2 changes: 1 addition & 1 deletion teos/cli/rpc_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ def get_user(self, user_id):
def stop(self):
"""Stops TEOS gracefully."""
self.stub.stop(Empty())
print("Closing the Eye of Satoshi")
print("Closing the Eye of Satoshi")
2 changes: 0 additions & 2 deletions teos/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
import logging.handlers

SHUTDOWN_GRACE_TIME = 10 # Grace time in seconds to complete any pending call when stopping one of the services of TEOS
OUTDATED_USERS_CACHE_SIZE_BLOCKS = 10 # Size of the users cache, in blocks
2 changes: 0 additions & 2 deletions teos/gatekeeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
from queue import Queue
from threading import Lock
from threading import Thread
from readerwriterlock import rwlock
from collections import OrderedDict

from teos.cleaner import Cleaner
from teos.chain_monitor import ChainMonitor
Expand Down
4 changes: 2 additions & 2 deletions teos/watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,8 @@ def get_user_info(self, user_id):
user_id (:obj:`str`): the id of the requested user.
Returns:
:obj:`UserInfo <teos.gatekeeper.UserInfo> or :obj:`None`: The user data if found. :obj:`None` if not found, or
the ``user_id`` is invalid.
:obj:`UserInfo <teos.gatekeeper.UserInfo> or :obj:`None`: The user data if found. :obj:`None` if not found,
or the ``user_id`` is invalid.
"""
return self.gatekeeper.registered_users.get(user_id)

Expand Down
9 changes: 0 additions & 9 deletions test/teos/unit/cli/test_teos_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,6 @@ def test_run_exception(cli, monkeypatch):
assert "Unknown error occurred: Mock Exception" == cli.run("mock_command_exception", [])


def test_get_tower_info(cli, monkeypatch):
rpc_client_mock = MagicMock(cli.rpc_client)
monkeypatch.setattr(cli, "rpc_client", rpc_client_mock)

cli.run("get_tower_info", [])

rpc_client_mock.get_tower_info.assert_called_once()


def test_unknown_command_exits(cli):
assert "Unknown command" in cli.run("this_command_probably_doesnt_exist", [])

Expand Down

0 comments on commit 0fd765a

Please sign in to comment.