-
Notifications
You must be signed in to change notification settings - Fork 57
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
fix pylint line-too-long errors in tests #697
Changes from 2 commits
b678438
24bda27
f3576da
500ea65
17d2251
177e62b
8954be2
6b5d963
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,7 +93,8 @@ def dense_matrix_based_update( | |
np.testing.assert_allclose( | ||
updated_belief.A.cov.todense(), | ||
A_naive.cov.todense(), | ||
err_msg="Covariance of system matrix estimate does not match naive implementation.", | ||
err_msg="""Covariance of system matrix estimate does not | ||
match naive implementation.""", | ||
) | ||
|
||
# Inverse | ||
|
@@ -105,5 +106,6 @@ def dense_matrix_based_update( | |
np.testing.assert_allclose( | ||
updated_belief.Ainv.cov.todense(), | ||
Ainv_naive.cov.todense(), | ||
err_msg="Covariance of matrix inverse estimate does not match naive implementation.", | ||
err_msg="""Covariance of matrix inverse estimate does not | ||
match naive implementation.""", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above |
||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,8 @@ def dense_matrix_based_update( | |
np.testing.assert_allclose( | ||
updated_belief.A.cov.todense(), | ||
A_naive.cov.todense(), | ||
err_msg="Covariance of system matrix estimate does not match naive implementation.", | ||
err_msg="""Covariance of system matrix estimate does not | ||
match naive implementation.""", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment in |
||
) | ||
|
||
# Inverse | ||
|
@@ -111,5 +112,6 @@ def dense_matrix_based_update( | |
np.testing.assert_allclose( | ||
updated_belief.Ainv.cov.todense(), | ||
Ainv_naive.cov.todense(), | ||
err_msg="Covariance of matrix inverse estimate does not match naive implementation.", | ||
err_msg="""Covariance of matrix inverse estimate does not | ||
match naive implementation.""", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment in |
||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,7 +138,8 @@ def test_normal_dimension_mismatch(self): | |
(np.array([[-1, 0], [2, 1]]), np.eye(3)), | ||
]: | ||
with self.subTest(): | ||
err_msg = "Mean and kernels mismatch in normal distribution did not raise a ValueError." | ||
err_msg = """Mean and kernels mismatch in normal distribution | ||
did not raise a ValueError.""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment in |
||
with self.assertRaises(ValueError, msg=err_msg): | ||
assert randvars.Normal(mean=mean, cov=cov) | ||
|
||
|
@@ -204,9 +205,8 @@ def test_symmetric_samples(self): | |
B.T, | ||
atol=1e-5, | ||
rtol=1e-5, | ||
msg="Sample {} from symmetric Kronecker distribution is not symmetric.".format( | ||
i | ||
), | ||
msg=f"""Sample {i} from symmetric Kronecker | ||
distribution is not symmetric.""", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment in |
||
) | ||
|
||
def test_indexing(self): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,4 +80,3 @@ commands = | |
# pylint benchmarks --disable="unused-argument,attribute-defined-outside-init,missing-function-docstring" --jobs=0 # not a work in progress, but final | ||
pylint benchmarks --disable="unused-argument,attribute-defined-outside-init,no-else-return,no-self-use,consider-using-from-import,missing-module-docstring,missing-class-docstring,missing-function-docstring" --jobs=0 | ||
# pylint tests --disable="missing-function-docstring" --jobs=0 # not a work in progress, but final | ||
pylint tests --disable="arguments-differ,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,unused-private-member,attribute-defined-outside-init,no-else-return,no-self-use,consider-using-from-import,duplicate-code,line-too-long,missing-module-docstring,missing-class-docstring,missing-function-docstring,missing-param-doc,missing-type-doc,missing-raises-doc,missing-return-type-doc,redundant-returns-doc" --jobs=0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing this line skips running pylint on the tests entirely. Please only remove the disabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we don't really want a line break in the error message