You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The problem is that whenever we have a multidimensional array for test-cases, black formats them
"vertically", resulting to a very high LOC and uglier code. See this issue
To Reproduce
$ black tests/
$ vim tests/backend/topology/test_von_neumann.py
Then check test_delannoy_numbers and observe how the n-dim array is formatted.
Expected behavior
It's better to retain the current formatting.
Environment (please complete the following information):
OS: [e.g. Linux] Linux
Version [e.g. Ubuntu 16.04] Ubuntu 16.04
PySwarms Version [e.g. v.0.2.0] v.0.3.0
Python Version [e.g. 3.6.X] 3.6.X
Additional context
We can easily solve this by using fmt: off followed by # fmt: on on specific parts of the code. However, we also need to identify parts of the code where we need to use this formatting.
The text was updated successfully, but these errors were encountered:
To be honest this looks like a really ugly solution to me 😕. This would be better off as an option in the black module instead of something that has to be done manually.
For now this is what we can only do. Using external files to export our predefined numpy arrays seems to convolute everything. Unless there's a better way to remove the n-dimensional arrays that we have, maybe hypothesis can make our predefined arrays more generalized (and reproducible?)
Resolves: #201
Added fmt: off and fmt: on commments to n-dimensional arrays in the test suite to prevent the ugly wrapping of arrays. Ran the black package to format the whole project.
Resolves: #201
Added fmt: off and fmt: on commments to n-dimensional arrays in the test suite to prevent the ugly wrapping of arrays. Ran the black package to format the whole project.
Describe the bug
The problem is that whenever we have a multidimensional array for test-cases, black formats them
"vertically", resulting to a very high LOC and uglier code. See this issue
To Reproduce
Then check
test_delannoy_numbers
and observe how the n-dim array is formatted.Expected behavior
It's better to retain the current formatting.
Environment (please complete the following information):
Additional context
We can easily solve this by using
fmt: off
followed by# fmt: on
on specific parts of the code. However, we also need to identify parts of the code where we need to use this formatting.The text was updated successfully, but these errors were encountered: