lenskit/lkpy

View on GitHub

Showing 14 of 653 total issues

ItemList has 31 functions (exceeds 20 allowed). Consider refactoring.
Open

class ItemList:
    """
    Representation of a (usually ordered) list of items, possibly with scores
    and other associated data; many components take and return item lists.  Item
    lists are to be treated as **immutable** — create a new list with modified
Severity: Minor
Found in lenskit/lenskit/data/items.py - About 3 hrs to fix

    Dataset has 24 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Dataset(ABC):
        """
        Representation of a data set for LensKit training, evaluation, etc. Data can
        be accessed in a variety of formats depending on the needs of a component.
    
    
    Severity: Minor
    Found in lenskit/lenskit/data/dataset.py - About 2 hrs to fix

      Function fit has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def fit(self, data: Dataset, **kwargs):
              """
              Train a FunkSVD model.
      
              Args:
      Severity: Minor
      Found in lenskit-funksvd/lenskit/funksvd.py - About 1 hr to fix

        Function fit has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def fit(self, data: Dataset, **kwargs):
                """
                Train a model.
        
                The model-training process depends on ``save_nbrs`` and ``min_sim``, but *not* on other
        Severity: Minor
        Found in lenskit/lenskit/algorithms/knn/item.py - About 1 hr to fix

          Function predict_for_user has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def predict_for_user(self, user, items, ratings=None):
                  """
                  Compute predictions for a user and items.
          
                  Args:
          Severity: Minor
          Found in lenskit/lenskit/algorithms/knn/user.py - About 1 hr to fix

            Avoid too many return statements within this function.
            Open

                return False
            Severity: Major
            Found in lenskit/lenskit/pipeline/types.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return NotImplemented
              Severity: Major
              Found in lenskit/lenskit/parallel/serialize.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return True
                Severity: Major
                Found in lenskit/lenskit/pipeline/types.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return True
                  Severity: Major
                  Found in lenskit/lenskit/pipeline/types.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return reduce_storage(obj)
                    Severity: Major
                    Found in lenskit/lenskit/parallel/serialize.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return True
                      Severity: Major
                      Found in lenskit/lenskit/pipeline/types.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return True
                        Severity: Major
                        Found in lenskit/lenskit/pipeline/types.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return False
                          Severity: Major
                          Found in lenskit/lenskit/pipeline/types.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return cls(user_id=data)
                            Severity: Major
                            Found in lenskit/lenskit/data/query.py - About 30 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language