From 0f9e570b70c3c6a90e079bf36619cee70104a4c2 Mon Sep 17 00:00:00 2001 From: Jack-Vines Date: Tue, 9 Jul 2024 08:49:11 +0100 Subject: [PATCH] fix black formatting --- ojd_daps_skills/extract_skills/extract_skills.py | 8 +++++--- ojd_daps_skills/utils/download_public_data.py | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ojd_daps_skills/extract_skills/extract_skills.py b/ojd_daps_skills/extract_skills/extract_skills.py index d46d579a..06dd51db 100644 --- a/ojd_daps_skills/extract_skills/extract_skills.py +++ b/ojd_daps_skills/extract_skills/extract_skills.py @@ -73,7 +73,7 @@ def extract_skills(self, job_ads: Union[str, List[str]]) -> List[Doc]: # map skills function - def get_skills(self, job_ad: str, min_length: int=75) -> Doc: + def get_skills(self, job_ad: str, min_length: int = 75) -> Doc: """Return a spaCy Doc object with entities and split 'SKILL' spans. @@ -103,9 +103,11 @@ def get_skills(self, job_ad: str, min_length: int=75) -> Doc: for rule in rules: split_ent = rule(ent) if split_ent: - all_skill_ents += split_ent # Add the list of split skills + all_skill_ents += ( + split_ent # Add the list of split skills + ) split_found = True - break # stop going through rules + break # stop going through rules if not split_found: # else, if no split, append the original entity all_skill_ents.append(ent) diff --git a/ojd_daps_skills/utils/download_public_data.py b/ojd_daps_skills/utils/download_public_data.py index ff41f190..db09f1aa 100644 --- a/ojd_daps_skills/utils/download_public_data.py +++ b/ojd_daps_skills/utils/download_public_data.py @@ -20,7 +20,9 @@ def download_data(): key = "escoe_extension/ojd_daps_skills_data_refactor.zip" try: - s3.download_file(bucket_name, key, f"{str(PUBLIC_DATA_FOLDER_PATH)}_refactor.zip") + s3.download_file( + bucket_name, key, f"{str(PUBLIC_DATA_FOLDER_PATH)}_refactor.zip" + ) with ZipFile(f"{PUBLIC_DATA_FOLDER_PATH}_refactor.zip", "r") as zip_ref: zip_ref.extractall(PROJECT_DIR)