Skip to content

Commit

Permalink
fixing more ruff linting issues #102
Browse files Browse the repository at this point in the history
  • Loading branch information
bensteUEM committed Oct 7, 2024
1 parent 628414a commit 246fa69
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion churchtools_api/churchtools_api_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def combine_paginated_response_data(
Args:
response_content: the original response form ChurchTools which either has meta/pagination or not
url: the url used for the original request in order to repear it
kwargs - can contain headers and params passthrough
kwargs: can contain headers and params passthrough
Returns:
response 'data' without pagination
Expand Down
13 changes: 10 additions & 3 deletions churchtools_api/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ def get_groups(self, **kwargs) -> list[dict]:
Keywords:
group_id: int: optional filter by group id (only to be used on it's own)
kwargs: keyword arguments passthrough
Keywords:
group_id
Permissions:
requires "view group" for all groups which should be considered
Expand Down Expand Up @@ -117,7 +121,7 @@ def create_group(
name: required name
group_status_id: required status id
grouptype_id: required grouptype id
k
kwargs: keywords see below
Kwargs:
campus_id: int: optional campus id
Expand Down Expand Up @@ -284,6 +288,7 @@ def get_group_members(self, group_id: int, **kwargs) -> list[dict]:
Arguments:
group_id: group id
kwargs: see below
Kwargs:
role_ids: list[int]: optional filter list of role ids
Expand Down Expand Up @@ -326,8 +331,9 @@ def get_groups_members(
Args:
group_ids: list of group ids to look for. Defaults to Any
with_deleted: If true return also delted group members. Defaults to True
kwargs: see below
Kwargs:
Keywords:
grouptype_role_ids: list[int] of grouptype_role_ids to consider
person_ids: list[int]: person to consider for result
Expand Down Expand Up @@ -379,8 +385,9 @@ def add_group_member(self, group_id: int, person_id: int, **kwargs) -> dict:
Arguments:
group_id: required group id
person_id: required person id
kwargs: see below
Kwargs:
Keywords:
grouptype_role_id: int: optional grouptype role id
group_member_status: str: optional member status
Expand Down
4 changes: 2 additions & 2 deletions churchtools_api/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def get_bookings(self, **kwargs) -> list[dict]:
"""Access to all Resource bookings in churchtools based on a combination of Keyword Arguments.
Arguments:
kwargs - see list below - some combination limits do apply
kwargs: see list below - some combination limits do apply
KwArgs:
Keywords:
booking_id: int: only one booking by id (use standalone only)
resources_ids:list[int]: required if not booking_id
status_ids: list[int]: filter by list of stats ids to consider (requires resource_ids)
Expand Down
1 change: 1 addition & 0 deletions generate_pyproj.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"autopep8": "^2.0.4",
"pytest": "^8.3.3",
"pre-commit": "^3.8.0",
"ruff": "^0.6.9",
},
},
},
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ setuptools = "^66.1.1"
autopep8 = "^2.0.4"
pytest = "^8.3.3"
pre-commit = "^3.8.0"
ruff = "^0.6.9"

[tool.ruff]
exclude = [
Expand Down Expand Up @@ -64,10 +65,11 @@ select = [
"ALL",
]
ignore = [
"S101",
"S101", # TODO: Github #104 - pytest asserts
"ANN001","ANN002","ANN003","ANN201",
"FIX002",
"C901","ARG002",
"FIX002", #Open ToDos
"C901", #complexity
"ARG002",
"FA100",
"FBT001","FBT002",
"TD002","TD003","TD004",
Expand All @@ -81,9 +83,7 @@ ignore = [
"PTH110","PTH107","PTH123","PTH118","PTH112","PTH103",
"SIM102","SIM113","SIM115",
"G001","G003", "G004",
"B024",
"A001","A002",
"D417",
"TRY300",
"BLE001",
"PERF401"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_churchtools_api_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
logging.config.dictConfig(config=logging_config)


class TestsChurchToolsApiAbstract(ABC):
class TestsChurchToolsApiAbstract(ABC): # noqa: B024
"""This is supposed to be the base configuration for PyTest test classes that require API access."""

def setup_class(self) -> None:
Expand Down

0 comments on commit 246fa69

Please sign in to comment.