-
Notifications
You must be signed in to change notification settings - Fork 18
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
Code cleanup for dangling file pointer investigation #316
Conversation
Codecov Report
@@ Coverage Diff @@
## master #316 +/- ##
==========================================
+ Coverage 46.88% 46.92% +0.03%
==========================================
Files 231 231
Lines 19166 19129 -37
Branches 2758 2745 -13
==========================================
- Hits 8986 8976 -10
+ Misses 9683 9658 -25
+ Partials 497 495 -2 |
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.
Nice clean up 👍
Tests pass, code makes sense, expect there is more of this nonsense to be found but this still helps thank you
@@ -1502,7 +1501,7 @@ def from_dict(obj, check_format=True, directory=None): | |||
def from_json(string, check_format=True, directory=None): | |||
"""Decode a datablock from JSON string.""" | |||
return DataBlockFactory.from_dict( | |||
json.loads(string, object_hook=_decode_dict), | |||
json.loads(string), |
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.
was the object_hook
stuff really useless?
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.
on Python 3 it was a no-op
@@ -1,14 +1,9 @@ | |||
from __future__ import absolute_import, division, print_function |
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.
🙂
|
||
from dxtbx.model.crystal import CrystalFactory | ||
from dxtbx.serialize.imageset import imageset_from_dict | ||
|
||
|
||
def _decode_list(data): |
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 is only useless now we are in the future 👍
Investigation into dials/dials#1603 found some superfluous programming motifs that made it unnecessarily difficult to figure out what is going on.