Skip to content

Commit

Permalink
Merge pull request #52 from globaldothealth/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
abhidg authored Jun 24, 2024
2 parents f6e2427 + 034f5ac commit e1c5b29
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.4"
rev: "v0.4.10"
hooks:
- id: ruff
args: [--fix, --show-fixes]
Expand All @@ -14,6 +14,6 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.1.0
rev: 24.4.2
hooks:
- id: black
1 change: 1 addition & 0 deletions fhirflat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
fhirflat is a library for transforming FHIR resources in NDJSON or native Python
dictionaries to a flat structure that can be written to a Parquet file.
"""

from .resources import (
Condition,
Encounter,
Expand Down
6 changes: 3 additions & 3 deletions fhirflat/resources/extension_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ def fhir_model_validator(
self, model_name: str, v: Union[StrBytes, dict, Path, FHIRAbstractModel]
):
""" """
model_class: Type[BaseModel] | Type[
FHIRAbstractModel
] = self.get_fhir_model_class(model_name)
model_class: Type[BaseModel] | Type[FHIRAbstractModel] = (
self.get_fhir_model_class(model_name)
)

if isinstance(v, (str, bytes)):
try:
Expand Down
1 change: 1 addition & 0 deletions fhirflat/resources/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.. _FHIR resources: https://pypi.org/project/fhir.resources/
"""

from __future__ import annotations

from typing import Any, Union
Expand Down
24 changes: 12 additions & 12 deletions fhirflat/resources/patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@


class Patient(_Patient, FHIRFlatBase):
extension: list[
Union[ageType, birthSexType, raceType, fhirtypes.ExtensionType]
] = Field(
None,
alias="extension",
title="Additional content defined by implementations",
description=(
"""
extension: list[Union[ageType, birthSexType, raceType, fhirtypes.ExtensionType]] = (
Field(
None,
alias="extension",
title="Additional content defined by implementations",
description=(
"""
Contains the G.H 'age' and 'birthSex' extensions,
and allows extensions from other implementations to be included."""
),
# if property is element of this resource.
element_property=True,
union_mode="smart",
),
# if property is element of this resource.
element_property=True,
union_mode="smart",
)
)

# attributes to exclude from the flat representation
Expand Down

0 comments on commit e1c5b29

Please sign in to comment.