-
-
Notifications
You must be signed in to change notification settings - Fork 27
Added has copyright and has license attribute to delta objects #141
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -283,9 +283,17 @@ class Delta(object): | |
| def __init__(self, score=0, new_file=None, old_file=None): | ||
| self.new_file = new_file if new_file else None | ||
| self.old_file = old_file if old_file else None | ||
| self.has_license = False | ||
| self.has_copyright = False | ||
| self.factors = [] | ||
| self.score = score | ||
| self.status = '' | ||
|
|
||
| def add_license(self) : | ||
| self.has_license = True | ||
|
|
||
| def add_copyright(self): | ||
| self.has_copyright = True | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really need separate functions to simply change a field value?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MaJuRG ,no actually it can be modified a bit and made to change the values in place,But I thaught creating a function for it wold be a better approach to it.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MaJuRG Should I change it?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. if all the function does is change a value, there is no need for it. We can add a function later if there is more complex operations to be done. Also I question the need for these field anyway. Is there an issue regarding this or...?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I think the issue of #109 is meant for it i.g
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok then these fields are fine. |
||
|
|
||
| def update(self, score=0, factor=''): | ||
| """ | ||
|
|
||
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.
Why do we need these again?
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.
@MaJuRG I provided it as attributes of every delta objects,as we can just check these booleans for determining weather the respective deltas has a license or copyright(either new or old file)
Depending on these booleans we can actually use the license Expression Library