File interfaces.py
has 274 lines of code (exceeds 250 allowed). Consider refactoring.
from uplink import compat
class IllegalRequestStateTransition(RuntimeError):
Function users_for_keyword
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
def users_for_keyword():
"""
/users?keyword=<keyword>[?oldest-age=<age in weeks>]
Find the top users who have commited in repositories matching the keyword in the last month"""
Function get_call_args
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
def get_call_args(f, *args, **kwargs):
sig = signature(f)
arguments = sig.bind(*args, **kwargs).arguments
new_arguments = []
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring.
def __init__(
Function _encode_pydantic_v1
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
def _encode_pydantic_v1(obj: Any) -> Any:
from pydantic.v1.json import pydantic_encoder
if isinstance(obj, str | int | float | bool) or obj is None:
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring.
def __init__(
Function commits_for_repo
has 5 arguments (exceeds 4 allowed). Consider refactoring.
def commits_for_repo(
Avoid too many return
statements within this function.
return None
Function _base_converter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def _base_converter(self, type_):
if isinstance(type_, BaseTypeConverter.Builder):
return type_.build()
if self._check_typing(type_):
if issubclass(type_.__origin__, self.typing.Sequence):