Skip to content
Snippets Groups Projects

#402: Update to Click v8.0.0 and fix deprecation warning

Merged #402: Update to Click v8.0.0 and fix deprecation warning
Merged Moul requested to merge 402_click_v8.0 into dev
3 files
+ 24
9
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 3
2
@@ -15,9 +15,10 @@ You should have received a copy of the GNU Affero General Public License
@@ -15,9 +15,10 @@ You should have received a copy of the GNU Affero General Public License
along with Silkaj. If not, see <https://www.gnu.org/licenses/>.
along with Silkaj. If not, see <https://www.gnu.org/licenses/>.
"""
"""
 
import shutil
from operator import eq, itemgetter, ne, neg
from operator import eq, itemgetter, ne, neg
from click import argument, command, echo_via_pager, get_terminal_size, option
from click import argument, command, echo_via_pager, option
from duniterpy.api.bma.tx import history
from duniterpy.api.bma.tx import history
from duniterpy.documents.transaction import Transaction
from duniterpy.documents.transaction import Transaction
from pendulum import from_timestamp, now
from pendulum import from_timestamp, now
@@ -53,7 +54,7 @@ async def transaction_history(pubkey, uids, full_pubkey):
@@ -53,7 +54,7 @@ async def transaction_history(pubkey, uids, full_pubkey):
txs_list = await generate_table(
txs_list = await generate_table(
received_txs, sent_txs, pubkey, ud_value, currency_symbol, uids, full_pubkey
received_txs, sent_txs, pubkey, ud_value, currency_symbol, uids, full_pubkey
)
)
table = Texttable(max_width=get_terminal_size()[0])
table = Texttable(max_width=shutil.get_terminal_size().columns)
table.add_rows(txs_list)
table.add_rows(txs_list)
await client.close()
await client.close()
echo_via_pager(header + table.draw())
echo_via_pager(header + table.draw())
Loading