-
Notifications
You must be signed in to change notification settings - Fork 299
Replaced OrderedDict with dict #1132
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
Conversation
Removing OrderedDict
is not an urgent task, however it makes the code more readable at a few instances. So I would love to remove it, but really want to avoid regressions. Codecov shows that there are a couple of code paths which I needed to change, which actually do not have any test coverage.
I would see three ways forward:
- wait till Convert all tests to pytest #468 is completed
- add test for those missing paths in this PR (could be cumbersome)
- Force merge it as test coverage actually does not change. We would have to be fairly confident, that the source changes are not breaking anything.
@n2ygk Any thoughts?
Removing
OrderedDict
is not an urgent task, however it makes the code more readable at a few instances. So I would love to remove it, but really want to avoid regressions. Codecov shows that there are a couple of code paths which I needed to change, which actually do not have any test coverage.I would see three ways forward:
- wait till Convert all tests to pytest #468 is completed
- add test for those missing paths in this PR (could be cumbersome)
- Force merge it as test coverage actually does not change. We would have to be fairly confident, that the source changes are not breaking anything.
@n2ygk Any thoughts?
@sliverc I think it will be pretty safe to replace OrderedDict
and certainly improves readability, especially when it is invoked with a list of tuples vs. the much more readable dict syntax. A force merge in this case seems fine.
75075cb
to
3bbd411
Compare
3bbd411
to
6b28ec9
Compare
Sounds good. I made the PR ready then for merging. I went through all changes again, but please have a close look whether everything looks good to you.
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. Nice cleanup, tightening up the loops while eliminating OrderedDict
.
Per our conversation doing a force merge to get around failed codecov target.
Uh oh!
There was an error while loading. Please reload this page.
Fixes #1094
Description of the Change
As Python 3.7+ now ensures that dicts are ordered, there is no need to use
OrderedDict
anymore.See in-depth explanation at #1094 (comment)
Using regular dicts also make the code more readable and easier debuggable.
Checklist
CHANGELOG.md
updated (only for user relevant changes)AUTHORS