Showing 53 of 53 total issues
Cyclomatic complexity is too high in function load. (7) Open
def load(g: GT) -> GT: """Load synthetic dataset. Args: g: an instance of bipartite graph.
- Read upRead up
- Exclude checks
Cyclomatic complexity is too high in function threshold. (7) Open
@main.command()@click.argument("method", type=click.Choice(GRAPH_TYPES, case_sensitive=False))@click.option("--loop", type=int, default=20, metavar="LOOP", help="Number of iteration (default: 20).")@click.option( "--param",
- Read upRead up
- Exclude checks
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.
- Read upRead up
Function threshold
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def threshold(
Function ranking
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def ranking(
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:
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.
- Read upRead up
Line too long (85 > 79 characters) Open
# along with rgmining-synthetic-dataset. If not, see <http://www.gnu.org/licenses/>.
- Read upRead up
- Exclude checks
Line too long (80 > 79 characters) Open
# rgmining-synthetic-dataset is distributed in the hope that it will be useful,
- Read upRead up
- Exclude checks
Line too long (80 > 79 characters) Open
# rgmining-synthetic-dataset is distributed in the hope that it will be useful,
- Read upRead up
- Exclude checks
Line too long (118 > 79 characters) Open
sys.exit(f"Failed to initialize a graph object. Some parameter might need to be given via --param flag:\n{e}")
- Read upRead up
- Exclude checks
Line too long (119 > 79 characters) Open
def dcg(method: str, loop: int, param: list[tuple[str, str]], output: TextIO, plot: Optional[BinaryIO] = None) -> None:
- Read upRead up
- Exclude checks
Line too long (107 > 79 characters) Open
for i, r in enumerate(sorted(reviewers, key=lambda rv: rv.anomalous_score, reverse=True)[:k], start=1):
- Read upRead up
- Exclude checks
Line too long (85 > 79 characters) Open
# along with rgmining-synthetic-dataset. If not, see <http://www.gnu.org/licenses/>.
- Read upRead up
- Exclude checks
Line too long (107 > 79 characters) Open
"""This module defines a CLI command that evaluates a review graph algorithm with the synthetic dataset."""
- Read upRead up
- Exclude checks
Line too long (111 > 79 characters) Open
@click.option("--plot", type=click.File("bw"), help="File name of the result graph. If set, plot an ROC curve")
- Read upRead up
- Exclude checks
Line too long (105 > 79 characters) Open
method: str, loop: int, param: list[tuple[str, str]], output: TextIO, plot: Optional[BinaryIO] = None
- Read upRead up
- Exclude checks
Line too long (85 > 79 characters) Open
# along with rgmining-synthetic-dataset. If not, see <http://www.gnu.org/licenses/>.
- Read upRead up
- Exclude checks
Line too long (80 > 79 characters) Open
# rgmining-synthetic-dataset is distributed in the hope that it will be useful,
- Read upRead up
- Exclude checks
Line too long (85 > 79 characters) Open
# along with rgmining-synthetic-dataset. If not, see <http://www.gnu.org/licenses/>.
- Read upRead up
- Exclude checks