Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 1, 2023
1 parent 04984d6 commit d057a36
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 21 deletions.
1 change: 0 additions & 1 deletion fsd_utils/config/commonconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class CommonConfig:

FSD_LOG_LEVELS = {
"development": logging.DEBUG,
"unit_test": logging.DEBUG,
Expand Down
2 changes: 0 additions & 2 deletions fsd_utils/config/configclass.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
def configclass(cls):

# Checks base classes for _config_info_, a dict containing
# all infomation about config. attrs, and
# adds them to a list.
Expand Down Expand Up @@ -27,7 +26,6 @@ def configclass(cls):

@classmethod
def pretty_print(self):

from rich.table import Table
from rich.console import Console

Expand Down
1 change: 0 additions & 1 deletion fsd_utils/config/notify_constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class NotifyConstants:

# ---- Notification service endpoint ----#

NOTIFICATION_SERVICE_ENDPOINT = "/send"
Expand Down
1 change: 0 additions & 1 deletion fsd_utils/healthchecks/checkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def __init__(self, redis_client): # TypeHint: FlaskRedis
self.redis_client = redis_client

def check(self):

try:
self.redis_client.client_list()
return True, "OK"
Expand Down
1 change: 0 additions & 1 deletion fsd_utils/locale_selector/get_lang.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


def get_lang():

# get lang if lang query arg is set
language_from_query_args = request.args.get("lang")
if language_from_query_args:
Expand Down
1 change: 0 additions & 1 deletion fsd_utils/mapping/application/multi_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def format_values(cls, value, index):

@classmethod
def format_keys_and_values(cls, key: str, value: list, index: enumerate):

"""
Format the given key-value pair based on specified conditions.
Args:
Expand Down
1 change: 0 additions & 1 deletion fsd_utils/mapping/application/qa_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def extract_questions_and_answers(forms) -> dict:
questions_answers[form_name][field["title"]] = answer

elif isinstance(answer, bool) and field["type"] == "list":

questions_answers[form_name][field["title"]] = (
"Yes" if answer else "No"
)
Expand Down
1 change: 0 additions & 1 deletion fsd_utils/simple_utils/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


def get_remote_data_as_json(endpoint):

response = requests.get(endpoint)
if response.status_code == 200:
data = response.json()
Expand Down
1 change: 0 additions & 1 deletion fsd_utils/toggles/vcap_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

@dataclass
class VcapServices(object):

services: dict

@staticmethod
Expand Down
3 changes: 0 additions & 3 deletions tests/test_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class TestAuthentication:

test_payload = {
"accountId": "test-user",
"email": "test@example.com",
Expand All @@ -30,15 +29,13 @@ class TestAuthentication:
}

def _create_valid_token(self):

_test_private_key_path = str(Path(__file__).parent) + "/keys/rsa256/private.pem"
with open(_test_private_key_path, mode="rb") as private_key_file:
rsa256_private_key = private_key_file.read()

return jwt.encode(self.test_payload, rsa256_private_key, algorithm="RS256")

def _create_invalid_token(self):

_test_private_key_path = (
str(Path(__file__).parent) + "/keys/rsa256/private_invalid.pem"
)
Expand Down
2 changes: 0 additions & 2 deletions tests/test_healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def testWithChecksPassing_mocks(self, flask_test_client):

@mock.patch.dict(os.environ, clear=True)
def testWithChecksFailing_mocks(self, flask_test_client):

test_app = Mock()
health = Healthcheck(test_app)
test_app.add_url_rule.assert_called_with("/healthcheck", view_func=ANY)
Expand All @@ -71,7 +70,6 @@ def testWithChecksFailing_mocks(self, flask_test_client):

@mock.patch.dict(os.environ, clear=True)
def testWithChecksException_mocks(self, flask_test_client):

test_app = Mock()
health = Healthcheck(test_app)
test_app.add_url_rule.assert_called_with("/healthcheck", view_func=ANY)
Expand Down
6 changes: 0 additions & 6 deletions tests/test_mapping_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def test_simplify_title(section_name, remove_text, expected_response):
],
)
def test_remove_html_tags(input_value, expected_response):

response = FreeText.remove_html_tags(input_value)
assert response == expected_response

Expand Down Expand Up @@ -125,7 +124,6 @@ def test_extract_questions_and_answers_fail(app_context):
],
)
def test_format_checkbox(input_value, expected_response):

response = format_checkbox(input_value)
assert response == expected_response

Expand All @@ -141,7 +139,6 @@ def test_format_checkbox(input_value, expected_response):
],
)
def test_format_radio_field(input_value, expected_response):

response = format_radio_field(input_value)
assert response == expected_response

Expand All @@ -154,7 +151,6 @@ def test_format_radio_field(input_value, expected_response):
],
)
def test_format_month_year(input_value, expected_response):

response = format_month_year(input_value)
assert response == expected_response

Expand Down Expand Up @@ -184,7 +180,6 @@ class TestMultiInput:
],
)
def test_process_data(self, app_context, input_data, expected_response):

response = MultiInput.process_data(input_data)

assert response == expected_response
Expand Down Expand Up @@ -219,7 +214,6 @@ def test_process_data(self, app_context, input_data, expected_response):
],
)
def test_map_multi_input_data(self, app_context, input_data, expected_response):

response = MultiInput.map_multi_input_data(input_data)

assert response == expected_response

0 comments on commit d057a36

Please sign in to comment.