diff --git a/churchtools_api/__init__.py b/churchtools_api/__init__.py index e31b190..d1d99d4 100644 --- a/churchtools_api/__init__.py +++ b/churchtools_api/__init__.py @@ -1,2 +1,3 @@ """Module exposure.""" + __all__ = ["churchtools_api"] diff --git a/churchtools_api/churchtools_api_abstract.py b/churchtools_api/churchtools_api_abstract.py index 795bef4..e378741 100644 --- a/churchtools_api/churchtools_api_abstract.py +++ b/churchtools_api/churchtools_api_abstract.py @@ -24,7 +24,7 @@ def combine_paginated_response_data( self, response_content: dict, url: str, - **kwargs:dict, + **kwargs: dict, ) -> dict: """Helper function which combines data for requests for pagination. diff --git a/churchtools_api/groups.py b/churchtools_api/groups.py index 629cccc..46a882e 100644 --- a/churchtools_api/groups.py +++ b/churchtools_api/groups.py @@ -21,7 +21,7 @@ def __init__(self) -> None: """Inherited initialization.""" super() - def get_groups(self, **kwargs:dict) -> list[dict]: + def get_groups(self, **kwargs: dict) -> list[dict]: """Gets list of all groups. Keywords: @@ -61,7 +61,7 @@ def get_groups(self, **kwargs:dict) -> list[dict]: ) return None - def get_groups_hierarchies(self)->dict: + def get_groups_hierarchies(self) -> dict: """Get list of all group hierarchies and convert them to a dict. Returns: @@ -126,7 +126,7 @@ def create_group( name: str, group_status_id: int, grouptype_id: int, - **kwargs:dict, + **kwargs: dict, ) -> dict: """Create a new group. @@ -244,7 +244,7 @@ def delete_group(self, group_id: int) -> bool: ) return None - def get_grouptypes(self, **kwargs:dict)->dict: + def get_grouptypes(self, **kwargs: dict) -> dict: """Get list of all grouptypes. Arguments: @@ -279,7 +279,7 @@ def get_grouptypes(self, **kwargs:dict)->dict: ) return None - def get_group_permissions(self, group_id: int)->dict: + def get_group_permissions(self, group_id: int) -> dict: """Get permissions of the current user for the given group. Arguments: @@ -306,7 +306,7 @@ def get_group_permissions(self, group_id: int)->dict: ) return None - def get_group_members(self, group_id: int, **kwargs:dict) -> list[dict]: + def get_group_members(self, group_id: int, **kwargs: dict) -> list[dict]: """Get list of members for the given group. Arguments: @@ -350,7 +350,7 @@ def get_groups_members( group_ids: list[int] | None = None, *, with_deleted: bool = False, - **kwargs:dict, + **kwargs: dict, ) -> list[dict]: """Access to /groups/members to lookup group memberships. @@ -410,7 +410,7 @@ def get_groups_members( ) return None - def add_group_member(self, group_id: int, person_id: int, **kwargs:dict) -> dict: + def add_group_member(self, group_id: int, person_id: int, **kwargs: dict) -> dict: """Add a member to a group. Arguments: diff --git a/churchtools_api/persons.py b/churchtools_api/persons.py index 3986ece..22982f6 100644 --- a/churchtools_api/persons.py +++ b/churchtools_api/persons.py @@ -21,7 +21,7 @@ def __init__(self) -> None: """Inherited initialization.""" super() - def get_persons(self, **kwargs:dict) -> list[dict]: + def get_persons(self, **kwargs: dict) -> list[dict]: """Function to get list of all or a person from CT. Arguments: diff --git a/generate_pyproj.py b/generate_pyproj.py index a04e103..9fbc962 100644 --- a/generate_pyproj.py +++ b/generate_pyproj.py @@ -1,4 +1,5 @@ """helper to generate pyproject.toml using version.py.""" + import importlib.util from pathlib import Path @@ -84,7 +85,7 @@ # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) # codes by default. "select": ["ALL"], - "ignore": ["FIX002","COM812", "ISC001"], + "ignore": ["FIX002", "COM812", "ISC001"], "per-file-ignores": {"tests/*.py": ["S101"]}, # Allow fix for all enabled rules (when `--fix`) is provided. "fixable": ["ALL"], diff --git a/tests/test_churchtools_api_files.py b/tests/test_churchtools_api_files.py index 7a47932..e966c03 100644 --- a/tests/test_churchtools_api_files.py +++ b/tests/test_churchtools_api_files.py @@ -1,4 +1,5 @@ """module test files.""" + import json import logging import logging.config diff --git a/tests/test_churchtools_api_groups.py b/tests/test_churchtools_api_groups.py index d0b5714..056cc6f 100644 --- a/tests/test_churchtools_api_groups.py +++ b/tests/test_churchtools_api_groups.py @@ -119,7 +119,7 @@ def test_get_group_permissions(self) -> None: assert permissions["churchdb"]["+see group"] == EXPECTED_NUMNER_OF_PERMISSIONS assert permissions["churchdb"]["+edit group infos"] - def test_create_and_delete_group(self, caplog:pytest.LogCaptureFixture) -> None: + def test_create_and_delete_group(self, caplog: pytest.LogCaptureFixture) -> None: """Checks if groups can be created. IMPORTANT - This test method and the parameters used depend on target system! diff --git a/tests/test_churchtools_api_posts.py b/tests/test_churchtools_api_posts.py index 54c741d..44c2a4c 100644 --- a/tests/test_churchtools_api_posts.py +++ b/tests/test_churchtools_api_posts.py @@ -78,10 +78,8 @@ def test_get_posts_dates(self) -> None: ] assert all(FROM_DATE <= date <= TO_DATE for date in result_all_dates) - @pytest.mark.skip( - "issue with CT implementation reported" - ) - def test_get_posts_before_last_post(self, caplog:pytest.LogCaptureFixture) -> None: + @pytest.mark.skip("issue with CT implementation reported") + def test_get_posts_before_last_post(self, caplog: pytest.LogCaptureFixture) -> None: """Tries to get a all posts using date after filter and last_post_indentifier. Also tries to request with missing required dependant param