-
-
Notifications
You must be signed in to change notification settings - Fork 143
Fix #168: import order is now alphabetical #240
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
base: master
Are you sure you want to change the base?
Conversation
jmathai
left a comment
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.
Thanks for this PR.
I'd like to add some tests for this and make sure that it doesn't have any performance impact for large imports before merging.
If we merge this then we should do the same for the update command. https://github.com/jmathai/elodie/blob/master/elodie.py#L240
|
Thanks @jmathai - let me look at tests and the update function. |
|
Great. If you have questions then let me know. I could always open a PR with tests against your branch. |
jmathai
left a comment
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.
Thanks for the PR. Sorry it's taken a while to look at. If you can do this then I'll merge else I'll create a separate pull request in the future and merge.
| files.add(path) | ||
|
|
||
| for current_file in files: | ||
| for current_file in sorted(files): |
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.
Can merge this if we switch to using the sort method on files. Sorted makes a copy which takes up additional memory while .sort() is in-place and seems okay in this case.
3276ccf to
12c17c9
Compare
bbdb460 to
ec11497
Compare
This change sorts the files when doing the import.