From 91e5562ae01e68a6f5b98f24c9926d76cc205066 Mon Sep 17 00:00:00 2001 From: anasyusef Date: Mon, 12 Jul 2021 12:31:13 +0000 Subject: [PATCH] style: apply flake8 formatting --- .terraform/modules/vpc | 1 - tests/test_misc.py | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) delete mode 160000 .terraform/modules/vpc diff --git a/.terraform/modules/vpc b/.terraform/modules/vpc deleted file mode 160000 index 88e1c6ec7..000000000 --- a/.terraform/modules/vpc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 88e1c6ec7a8f6337b0d6bb9840bb70c8b3f14051 diff --git a/tests/test_misc.py b/tests/test_misc.py index 5b5a1400f..221c7b712 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -7,9 +7,9 @@ from unittest.mock import MagicMock import pytest from freqtrade.misc import (decimals_per_coin, file_dump_json, file_load_json, format_ms_time, - pair_to_filename, plural, render_template, + pair_to_filename, parse_db_uri_for_logging, plural, render_template, render_template_with_fallback, round_coin_value, safe_value_fallback, - safe_value_fallback2, shorten_date, parse_db_uri_for_logging) + safe_value_fallback2, shorten_date) def test_decimals_per_coin(): @@ -180,6 +180,7 @@ def test_render_template_fallback(mocker): assert isinstance(val, str) assert 'if self.dp' in val + def test_parse_db_uri_for_logging() -> None: postgresql_conn_uri = "postgresql+psycopg2://scott123:scott123@host/dbname" mariadb_conn_uri = "mariadb+mariadbconnector://app_user:Password123!@127.0.0.1:3306/company" @@ -187,10 +188,9 @@ def test_parse_db_uri_for_logging() -> None: sqlite_conn_uri = "sqlite:////freqtrade/user_data/tradesv3.sqlite" censored_pwd = "*****" - get_pwd = lambda x: x.split(':')[2].split('@')[0] + def get_pwd(x): return x.split(':')[2].split('@')[0] assert get_pwd(parse_db_uri_for_logging(postgresql_conn_uri)) == censored_pwd assert get_pwd(parse_db_uri_for_logging(mariadb_conn_uri)) == censored_pwd assert get_pwd(parse_db_uri_for_logging(mysql_conn_uri)) == censored_pwd assert sqlite_conn_uri == parse_db_uri_for_logging(sqlite_conn_uri) -