sassoftware / python-sasctl

Function with cyclomatic complexity higher than threshold PY-R1000
Anti-pattern
Minor
25 days agoa year old
JSONFiles.calculate_model_statistics has a cyclomatic complexity of 20 with "high" risk
1189            }
1190
1191    @classmethod
1192    def calculate_model_statistics(1193        cls,
1194        target_value: Union[str, int, float],
1195        prob_value: Union[int, float, None] = None,
JSONFiles.write_model_properties_json has a cyclomatic complexity of 26 with "very-high" risk
 280            return False
 281
 282    @classmethod
 283    def write_model_properties_json( 284        cls,
 285        model_name: str,
 286        target_variable: str,
_build_crud_funcs has a cyclomatic complexity of 24 with "high" risk
2176    return RestObj(json)
2177
2178
2179def _build_crud_funcs(path, single_term=None, plural_term=None, service_name=None):2180    """Utility method for defining simple functions to perform CRUD operations on a REST endpoint.
2181
2182    Parameters
Session._request_token_with_oauth has a cyclomatic complexity of 17 with "high" risk
1242        # Extract access token and return as an Oauth token
1243        return OAuth2Token(match.group(0))
1244
1245    def _request_token_with_oauth(1246        self,
1247        username=None,
1248        password=None,
Session.__init__ has a cyclomatic complexity of 26 with "very-high" risk
 282
 283    PROFILE_PATH = "~/.sas/viya-api-profiles.yaml"
 284
 285    def __init__( 286        self,
 287        hostname,
 288        username=None,