-
Notifications
You must be signed in to change notification settings - Fork 476
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
Document and clean core/artifact.py #478
Conversation
@@ -146,52 +51,67 @@ def __init__( | |||
self.sha1 = sha1 | |||
|
|||
def __hash__(self): | |||
try: | |||
if isinstance(self.artifact, list): | |||
return hash(str(self.artifact[:100])) |
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.
magic number?
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.
Ah, that was already in there unfortunately. I thought I added a comment complaining, I WILL!
from .artifact import Artifact | ||
|
||
|
||
def put_artifacts_back(d, lookup, artifact_store: t.Optional[ArtifactStore] = None): |
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.
nitpick:
a return typehint :)
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.
All of these need typehints, I have a separate branch already in progress for this...
@@ -36,8 +36,8 @@ | |||
# to the rest of the code. | |||
# It should be moved to the Server's initialization code where it can be available to | |||
# all threads. | |||
from ...core.artifact 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.
much needed!
* Sort config members * Fix some quotes
Description
See #408.
More to come, see https://github.com/rec/superduperdb-stealth/commits/artifact-tree