Showing 653 of 653 total issues
ItemList
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
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
Dataset
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
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.
Function fit
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def fit(self, data: Dataset, **kwargs):
"""
Train a FunkSVD model.
Args:
Function fit
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Function predict_for_user
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def predict_for_user(self, user, items, ratings=None):
"""
Compute predictions for a user and items.
Args:
Avoid too many return
statements within this function. Open
Open
return False
Avoid too many return
statements within this function. Open
Open
return NotImplemented
Avoid too many return
statements within this function. Open
Open
return True
Avoid too many return
statements within this function. Open
Open
return True
Avoid too many return
statements within this function. Open
Open
return reduce_storage(obj)
Avoid too many return
statements within this function. Open
Open
return True
Avoid too many return
statements within this function. Open
Open
return True
Avoid too many return
statements within this function. Open
Open
return False
Avoid too many return
statements within this function. Open
Open
return cls(user_id=data)
Line too long (87 > 79 characters) Open
Open
_logger.warn("implicit algorithm already trained, re-fit is usually a bug")
- Read upRead up
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (83 > 79 characters) Open
Open
the ``(min, max)`` rating values to clamp ratings, or ``None`` to leave
- Read upRead up
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (85 > 79 characters) Open
Open
_logger.debug("have %d estimates for %d ratings", len(initial), len(rate_df))
- Read upRead up
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (93 > 79 characters) Open
Open
care what kind of data is in `data`, so long as it is a Pandas DataFrame (or equivalent).
- Read upRead up
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Whitespace before ':' Open
Open
trains = test_sets[:i] + test_sets[(i + 1) :]
- Read upRead up
- Exclude checks
Avoid extraneous whitespace.
Avoid extraneous whitespace in these situations:
- Immediately inside parentheses, brackets or braces.
- Immediately before a comma, semicolon, or colon.
Okay: spam(ham[1], {eggs: 2})
E201: spam( ham[1], {eggs: 2})
E201: spam(ham[ 1], {eggs: 2})
E201: spam(ham[1], { eggs: 2})
E202: spam(ham[1], {eggs: 2} )
E202: spam(ham[1 ], {eggs: 2})
E202: spam(ham[1], {eggs: 2 })
E203: if x == 4: print x, y; x, y = y , x
E203: if x == 4: print x, y ; x, y = y, x
E203: if x == 4 : print x, y; x, y = y, x
Line too long (88 > 79 characters) Open
Open
"wanted %d disjoint splits of %d each, but only have %d rows; partitioning",
- Read upRead up
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.