-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
CLN run isort on source code files #4239
Conversation
Hi @chandan5362 Thanks for taking this on, but some of the changes seem strange to me - were you up-to-date with the latest changes from Could you try running:
? |
Something's not quite right, you've ended up with extra lines of code which isort wouldn't add (e.g. in Can you fetch from your upstream branch, do
, then make the same change you've made here to |
Cool, thanks, now it looks right! Test failure is due to the changes in |
Thanks to you as well for being so generous and helpful. Feels like I am getting into open source slowly and looking forward to contribute more. Thanks a lot @MarcoGorelli |
I tried running pytest by explicitly importing |
OK, got it - currently, here's what happens: in this triggers in in in in And as you noted, So, just explicitly import |
Okay, Great! whether should I do the necessary changes and push it or you are going to resolve it yourself?? |
If you just put |
just to be clear - I don't maintain this library, so I can't add commits to your PR |
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.
pymc3/gp/util.py
Outdated
import numpy as np | ||
import theano.tensor as tt | ||
import warnings | ||
import theano.tensor.slinalg |
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.
you'll need to silence the pylint warning
import theano.tensor.slinalg | |
import theano.tensor.slinalg # pylint: disable=unused-import |
pymc3/math.py
Outdated
|
||
import numpy as np | ||
import scipy as sp | ||
import scipy.sparse | ||
|
||
# pylint: disable=unused-import |
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.
this line should probably only be applied where necessary (probably import scipy.sparse
and some of the import theano.
) rather than to the whole block
setup.py
Outdated
@@ -12,11 +12,13 @@ | |||
# See the License for the specific language governing permissions and | |||
# limitations under the License. | |||
|
|||
import re | |||
|
|||
#!/usr/bin/env python |
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.
pretty sure this shebang has no effect if it's not at the beginning of the file, so it can probably be removed
Codecov Report
@@ Coverage Diff @@
## master #4239 +/- ##
==========================================
- Coverage 87.64% 87.57% -0.08%
==========================================
Files 88 88
Lines 14363 14274 -89
==========================================
- Hits 12589 12500 -89
Misses 1774 1774
|
Thanks for updating - there's still some pylint warnings, if you run Maybe it's better to keep the The rest looks good anyway 👍 Takes a bit to review, but it only needs doing once |
Thanks @chandan5362 and @MarcoGorelli, this looks good! I'll merge once the merge conflict in |
@AlexAndorra @MarcoGorelli I have resolved the merge conflict and pushed it. Please let me know, if any issue still persists with my PR. |
Hi @chandan5362 - looks like there's still a conflict, could you please fetch upstream/master, merge, and push again? |
Can you show the exact commands you ran to resolve the conflict? It looks like it's still present |
mistakenly, instead of pushing it to remote, I pushed it to origin. |
@MarcoGorelli @chandan5362 I resolved the merge conflicts via the UI in Github. Anyway - you can now pull the branch and at least the conflicts should be resolved. |
maybe we want to postpone this after the rush of getting PRs in for 3.10, else there'll be too many conflicts? |
Doesn't look like this worked - what command did you run, @michaelosthege ? |
As I can see that there are many conflicting files as of now. please let me know if there is anything that I have to do @MarcoGorelli |
Hey @chandan5362 - yeah, you could either merge the conflicts, or you could just do a hard git reset to |
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.
Looks good to me! Thanks @chandan5362 and @MarcoGorelli!
Solved this issue #4235
added
isort
for python files in .pre-commit-config.yaml