rgmining/synthetic

View on GitHub

Showing 5 of 53 total issues

Function calc_anomalous_reviews has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

def calc_anomalous_reviews(reviewers: Iterable[Reviewer]) -> AnomalousReviews:
"""Counts the number of anomalous reviewers.
 
Args:
reviewers: A collection of reviewers.
Severity: Minor
Found in synthetic/eval/score.py - About 45 mins to fix

Function threshold has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def threshold(
Severity: Minor
Found in synthetic/eval/cli.py - About 35 mins to fix

    Function ranking has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def ranking(
    Severity: Minor
    Found in synthetic/eval/cli.py - About 35 mins to fix

      Function dcg has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def dcg(method: str, loop: int, param: list[tuple[str, str]], output: TextIO, plot: Optional[BinaryIO] = None) -> None:
      Severity: Minor
      Found in synthetic/eval/cli.py - About 35 mins to fix

        Function dcg has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        def dcg(reviewers: Iterable[Reviewer], k: int) -> float:
        """Computes a DCG score for a top-k ranking.
         
        Args:
        reviewers: A collection of reviewers.
        Severity: Minor
        Found in synthetic/eval/score.py - About 25 mins to fix
        Severity
        Category
        Status
        Source
        Language