diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 94c745a..7082825 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ default_stages: minimum_pre_commit_version: 2.16.0 repos: - repo: https://github.com/psf/black - rev: "23.11.0" + rev: "24.2.0" hooks: - id: black - repo: https://github.com/asottile/blacken-docs @@ -15,7 +15,7 @@ repos: hooks: - id: blacken-docs - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.1.0 + rev: v4.0.0-alpha.8 hooks: - id: prettier # Newer versions of node don't work on systems that have an older version of GLIBC @@ -25,7 +25,7 @@ repos: # https://github.com/jupyterlab/jupyterlab/issues/12675 language_version: "17.9.1" - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.6 + rev: v0.2.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/ehrdata/io/_omop.py b/ehrdata/io/_omop.py index b542c76..e8fc4a0 100644 --- a/ehrdata/io/_omop.py +++ b/ehrdata/io/_omop.py @@ -144,9 +144,11 @@ def from_dataframe(adata, feature: str, df): # Creating the array more efficiently ak_array = ak.Array( [ - grouped.get_group(visit_occurrence_id)[columns_in_ak_array].to_dict(orient="list") - if visit_occurrence_id in feature_ids - else empty_entry + ( + grouped.get_group(visit_occurrence_id)[columns_in_ak_array].to_dict(orient="list") + if visit_occurrence_id in feature_ids + else empty_entry + ) for visit_occurrence_id in unique_visit_occurrence_ids ] ) diff --git a/tests/test_basic.py b/tests/test_basic.py index 6cbb48b..4552089 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -1,6 +1,5 @@ -import pytest - import ehrdata as ehr +import pytest def test_package_has_version():