Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaminyou committed Jan 19, 2024
1 parent da4fdcd commit 98b9716
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions backend/parsers/parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import time
from datetime import datetime


PERSON_PROFILE_KEY = {
'name': str,
'gender': str,
Expand All @@ -23,7 +19,6 @@
}



def parse_personal_profile(
profile_instance,
):
Expand All @@ -37,7 +32,7 @@ def parse_personal_profile(
transform = PERSON_PROFILE_KEY[k]
v = transform(v)
response[k] = v
except:
except Exception:
pass
return response

Expand All @@ -55,7 +50,7 @@ def parse_request_instance(
transform = REQUEST_STATUS_KEY[k]
v = transform(v)
response[k] = v
except:
except Exception:
pass
return response

Expand All @@ -80,13 +75,15 @@ def parse_user_instance(user_instance):
response['category'] = user_instance.__dict__['category'].name
return response


def parse_subordinate_instances(subordinate_instances):
response = []
for subordinate_instance in subordinate_instances:
if subordinate_instance.__dict__['exist']:
response.append(parse_subordinate_instance(subordinate_instance))
return response


def parse_subordinate_instance(subordinate_instance):
response = {}
response['subordinate'] = subordinate_instance.__dict__['subordinate']
Expand Down

0 comments on commit 98b9716

Please sign in to comment.