From 8f036415975d6e224e5e94277997329c0f1fa159 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Fri, 29 Oct 2021 09:49:28 +0300 Subject: Feature/biweight reimplementation (#47) * add biweight reimplementation with pingouin * delete biweight scripts and tests * add python-pingouin to guix file * delete biweight paths * mypy fix:pingouin mising imports * pep8 formatting && pylint fixes--- mypy.ini | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mypy.ini') diff --git a/mypy.ini b/mypy.ini index 5d66812..a507703 100644 --- a/mypy.ini +++ b/mypy.ini @@ -11,3 +11,6 @@ ignore_missing_imports = True [mypy-ipfshttpclient.*] ignore_missing_imports = True + +[mypy-pingouin.*] +ignore_missing_imports = True \ No newline at end of file -- cgit v1.2.3 From 8169d8aacd8598730fd2e6eba06052e7502f2cc1 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Mon, 1 Nov 2021 09:05:32 +0300 Subject: Fix mypy issues --- gn3/authentication.py | 8 ++++---- mypy.ini | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'mypy.ini') diff --git a/gn3/authentication.py b/gn3/authentication.py index 892aa8f..7bc7b77 100644 --- a/gn3/authentication.py +++ b/gn3/authentication.py @@ -3,9 +3,9 @@ import functools import json from urllib.parse import urljoin from enum import Enum, unique -from typing import Dict +from typing import Dict, Union -import redis +from redis import Redis import requests @@ -40,7 +40,7 @@ class AdminRole(OrderedEnum): EDIT_ADMINS = "edit-admins" -def get_user_membership(conn: redis.Redis, user_id: str, +def get_user_membership(conn: Redis, user_id: str, group_id: str) -> Dict: """Return a dictionary that indicates whether the `user_id` is a member or admin of `group_id`. @@ -84,7 +84,7 @@ def get_highest_user_access_role( A dict indicating the highest access role the user has. """ - role_mapping = {} + role_mapping: Dict[str, Union[DataRole, AdminRole]] = {} for data_role, admin_role in zip(DataRole, AdminRole): role_mapping.update({data_role.value: data_role, }) role_mapping.update({admin_role.value: admin_role, }) diff --git a/mypy.ini b/mypy.ini index a507703..b0c48df 100644 --- a/mypy.ini +++ b/mypy.ini @@ -13,4 +13,10 @@ ignore_missing_imports = True ignore_missing_imports = True [mypy-pingouin.*] +ignore_missing_imports = True + +[mypy-redis.*] +ignore_missing_imports = True + +[mypy-requests.*] ignore_missing_imports = True \ No newline at end of file -- cgit v1.2.3