-
Notifications
You must be signed in to change notification settings - Fork 26
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
Ensure recover from bad tracker IDs #492
Conversation
Some can't be avoided, such as those around bpy property definitions.
Addresses an issue introduced in MCprep v3.5.0
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.
Since no one else seems to want to take charge of reviewing this, I'll just add my comments.
Seems good to me, albeit with some minor nitpicks I have in terms of style, but nothing seems off in the actual logic itself.
I won't approve or reject this PR though. I'll leave that to someone else (looking at y'all @zNightlord and @MajesticalDiscomfort)
self._tracker_idbackup = os.path.join( | ||
os.path.dirname(__file__), | ||
os.pardir, | ||
self._addon + "_trackerid.json") | ||
self._tracker_json = os.path.join( | ||
os.path.dirname(__file__), | ||
self._addon + "_tracker.json") |
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.
I think it'll be worthwhile to see how this would look with pathlib
, since pathlib
tends to be clearer
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.
idk I'm still a bit torn on pathlib always being better. It means we're more likely to stick with long lines, whereas right now I sort of like the multi line input arguments as clearly each segment of the path.
is this how you'd write that first line? (noting this goes over 80 charcters)
self._tracker_idbackup = Path(
os.path.dirname(__file__) / os.pardir / self._addon + "_trackerid.json")
In retrospect, the lines where we are using Pathlib are the ones most exceeding line lengths now in files like conf.py (even if we push to a newline after the (
in Path(
, still exceeds line length for the definition of self.json_path_update
)
I'll probably stick with this and merge this in the meantime, but feel free to comment after merging if I'm overlooking something.
Changes pushed, going to merge shortly.
|
This PR implements a few things:
Closes #491
All tests pass: