From a0a1c1de8840cd19b01d2442c46c8a37fc5f9fec Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Tue, 23 Jul 2024 17:18:55 +0530 Subject: [PATCH 1/2] Update pre-commit config --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f538841f5b..c8b61c98e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ default_stages: [commit] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.6.0 hooks: - id: no-commit-to-branch args: [--branch, develop, --branch, staging, --branch, production] @@ -23,13 +23,13 @@ repos: additional_dependencies: ["isort[pyproject]"] - repo: https://github.com/psf/black - rev: 24.4.0 + rev: 24.4.2 hooks: - id: black args: ["--config=pyproject.toml"] - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.1.0 hooks: - id: flake8 args: ["--config=.flake8"] From cfc095870da3e7f81948acf284d599ec43a1cce8 Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Tue, 23 Jul 2024 17:19:13 +0530 Subject: [PATCH 2/2] fix lint issues in `hcx/utils/fhir.py` --- care/hcx/utils/fhir.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/care/hcx/utils/fhir.py b/care/hcx/utils/fhir.py index 3f3b974a57..586183820f 100644 --- a/care/hcx/utils/fhir.py +++ b/care/hcx/utils/fhir.py @@ -1015,8 +1015,8 @@ def process_coverage_elibility_check_response(self, response): coverageeligibilityresponse.CoverageEligibilityResponse( **list( filter( - lambda entry: type(entry.resource) - == coverageeligibilityresponse.CoverageEligibilityResponse, + lambda entry: entry.resource + is coverageeligibilityresponse.CoverageEligibilityResponse, coverage_eligibility_check_bundle.entry, ) )[0].resource.dict() @@ -1025,7 +1025,7 @@ def process_coverage_elibility_check_response(self, response): coverage_request = coverage.Coverage( **list( filter( - lambda entry: type(entry.resource) == coverage.Coverage, + lambda entry: entry.resource is coverage.Coverage, coverage_eligibility_check_bundle.entry, ) )[0].resource.dict() @@ -1055,7 +1055,7 @@ def process_claim_response(self, response): claim_response = claimresponse.ClaimResponse( **list( filter( - lambda entry: type(entry.resource) == claimresponse.ClaimResponse, + lambda entry: entry.resource is claimresponse.ClaimResponse, claim_bundle.entry, ) )[0].resource.dict()