-
Notifications
You must be signed in to change notification settings - Fork 0
PIPE-888 #9
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
base: main
Are you sure you want to change the base?
PIPE-888 #9
Changes from all commits
aaa1c14
5971215
dcea4a5
8e828f7
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 | ||||
---|---|---|---|---|---|---|
|
@@ -33,8 +33,7 @@ def reference(self): | |||||
field_fn = fieldnames.IntentFieldnames() | ||||||
reference_fields = field_fn.calculate(self.ms, self.refintent) | ||||||
# run the answer through a set, just in case there are duplicates | ||||||
fields = {s for s in utils.safe_split(reference_fields)} | ||||||
|
||||||
fields = utils.deduplicate(s for s in utils.safe_split(reference_fields)) | ||||||
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. The
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
return ','.join(fields) | ||||||
|
||||||
refintent = vdp.VisDependentProperty(default='AMPLITUDE') | ||||||
|
@@ -67,10 +66,10 @@ def transfer(self): | |||||
references = set(self.ms.get_fields(task_arg=self.reference)) | ||||||
diff = transfers.difference(references) | ||||||
|
||||||
transfer_names = {f.name for f in diff} | ||||||
transfer_names = sorted(f.name for f in diff) | ||||||
fields_with_name = self.ms.get_fields(name=transfer_names) | ||||||
if len(fields_with_name) is not len(diff) or len(diff) is not len(transfer_names): | ||||||
return ','.join([str(f.id) for f in diff]) | ||||||
return ','.join(sorted(str(f.id) for f in diff)) | ||||||
else: | ||||||
return ','.join(transfer_names) | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -27,7 +27,7 @@ def reference(self): | |||||
field_fn = fieldnames.IntentFieldnames() | ||||||
reference_fields = field_fn.calculate(self.ms, self.refintent) | ||||||
# run the answer through a set, just in case there are duplicates | ||||||
fields = {s for s in utils.safe_split(reference_fields)} | ||||||
fields = utils.deduplicate(s for s in utils.safe_split(reference_fields)) | ||||||
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. The
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
return ','.join(fields) | ||||||
|
||||||
@vdp.VisDependentProperty | ||||||
|
@@ -47,10 +47,10 @@ def transfer(self): | |||||
references = set(self.ms.get_fields(task_arg=self.reference)) | ||||||
diff = transfers.difference(references) | ||||||
|
||||||
transfer_names = {f.name for f in diff} | ||||||
transfer_names = sorted(f.name for f in diff) | ||||||
fields_with_name = self.ms.get_fields(name=transfer_names) | ||||||
if len(fields_with_name) is not len(diff) or len(diff) is not len(transfer_names): | ||||||
return ','.join([str(f.id) for f in diff]) | ||||||
return ','.join(sorted(str(f.id) for f in diff)) | ||||||
else: | ||||||
return ','.join(transfer_names) | ||||||
|
||||||
|
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.
The
deduplicate
function is being called with a generator expression. Verify that thededuplicate
function can handle generators properly, as some deduplication implementations expect sequences or iterables that can be consumed multiple times.Copilot uses AI. Check for mistakes.