Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve pylint in linops for line-too-long #680

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/probnum/linops/_kronecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
class Symmetrize(_linear_operator.LinearOperator):
r"""Symmetrizes a vector in its matrix representation.

Given a vector :math:`x=\operatorname{vec}(X)` representing a square matrix :math:`X`, this linear operator computes :math:`y=\operatorname{vec}(\frac{1}{2}(X + X^\top))`.
Given a vector :math:`x=\operatorname{vec}(X)`
representing a square matrix :math:`X`,
this linear operator computes :math:
`y=\operatorname{vec}(\frac{1}{2}(X + X^\top))`.

Parameters
----------
Expand Down
12 changes: 7 additions & 5 deletions src/probnum/linops/_linear_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class LinearOperator:
:class:`LinearOperator`, that defers linear operations to the original operators and
combines the results.

To construct a concrete :class:`LinearOperator`, either pass appropriate callables to
the constructor of this class, or subclass it.
To construct a concrete :class:`LinearOperator`, either pass appropriate callables
to the constructor of this class, or subclass it.

A subclass must implement either one of the methods ``_matvec`` and ``_matmat``, and
the attributes/properties ``shape`` (pair of integers) and ``dtype`` (may be
Expand Down Expand Up @@ -254,7 +254,8 @@ def astype(
casting:
Controls what kind of data casting may occur.
subok:
If True, then sub-classes will be passed-through (default). False is currently not supported for linear operators.
If True, then sub-classes will be passed-through (default).
False is currently not supported for linear operators.
copy:
Whether to return a new linear operator, even if ``dtype`` is the same.
"""
Expand Down Expand Up @@ -828,8 +829,9 @@ def __matmul__(
Returns
-------
y :
A `np.matrix` or `np.ndarray` or `RandomVariable` with shape `(M,)` or `(M, 1)`,
depending on the type and shape of the x argument.
A `np.matrix` or `np.ndarray` or `RandomVariable` with
shape `(M,)` or `(M, 1)`,depending on the type and
shape of the x argument.
Notes
-----
This matvec wraps the user-specified matvec routine or overridden
Expand Down
3 changes: 2 additions & 1 deletion src/probnum/linops/_scaling.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
class Scaling(_linear_operator.LinearOperator):
r"""Scaling linear operator.

Creates a diagonal linear operator which (non-uniformly) scales elements of vectors, defined by
Creates a diagonal linear operator which (non-uniformly)
scales elements of vectors, defined by

.. math::
v \mapsto \begin{bmatrix}
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ commands =
pylint src/probnum/diffeq --disable="redefined-outer-name,too-many-instance-attributes,too-many-arguments,too-many-locals,too-few-public-methods,protected-access,unnecessary-pass,unused-variable,unused-argument,no-else-return,no-else-raise,no-self-use,duplicate-code,line-too-long,missing-function-docstring,missing-param-doc,missing-type-doc,missing-raises-doc,missing-return-type-doc" --jobs=0
pylint src/probnum/filtsmooth --disable="no-member,arguments-differ,too-many-arguments,too-many-locals,too-few-public-methods,protected-access,unused-variable,unused-argument,no-self-use,duplicate-code,useless-param-doc" --jobs=0
pylint src/probnum/linalg --disable="no-member,abstract-method,arguments-differ,redefined-builtin,too-many-instance-attributes,too-many-arguments,too-many-locals,too-many-lines,too-many-statements,too-many-branches,too-complex,too-few-public-methods,protected-access,unused-argument,attribute-defined-outside-init,no-else-return,no-else-raise,no-self-use,else-if-used,duplicate-code,line-too-long,missing-module-docstring,missing-param-doc,missing-type-doc,missing-raises-doc,missing-return-type-doc" --jobs=0
pylint src/probnum/linops --disable="too-many-instance-attributes,too-many-arguments,too-many-locals,protected-access,no-else-return,no-else-raise,else-if-used,line-too-long,missing-class-docstring,missing-function-docstring,missing-raises-doc,duplicate-code" --jobs=0
pylint src/probnum/linops --disable="too-many-instance-attributes,too-many-arguments,too-many-locals,protected-access,no-else-return,no-else-raise,else-if-used,missing-class-docstring,missing-function-docstring,missing-raises-doc,duplicate-code" --jobs=0
pylint src/probnum/problems --disable="too-many-arguments,too-many-locals,unused-variable,unused-argument,else-if-used,consider-using-from-import,duplicate-code,line-too-long,missing-module-docstring,missing-function-docstring,missing-param-doc,missing-type-doc,missing-raises-doc" --jobs=0
pylint src/probnum/quad --disable="too-many-arguments,missing-module-docstring" --jobs=0
pylint src/probnum/randprocs --disable="arguments-differ,arguments-renamed,too-many-instance-attributes,too-many-arguments,too-many-locals,protected-access,unused-argument,no-else-return,duplicate-code,line-too-long,missing-module-docstring,missing-class-docstring,missing-function-docstring,missing-type-doc,missing-raises-doc,useless-param-doc,useless-type-doc,missing-return-type-doc" --jobs=0
Expand Down