Skip to content
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

FIX: Modified return statement for sweep_around_axis and sweep_along_path so methods accept lists without creating error messages in AEDT. #5416

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

DaveTwyman
Copy link
Contributor

No description provided.

…so methods accept lists without creating error messages in AEDT.
@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

@DaveTwyman DaveTwyman changed the title Modified return statement for sweep_around_axis and sweep_along_path so methods accept lists without creating error messages in AEDT. Fix: Modified return statement for sweep_around_axis and sweep_along_path so methods accept lists without creating error messages in AEDT. Nov 12, 2024
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 8 lines in your changes missing coverage. Please review.

Project coverage is 84.38%. Comparing base (f73c6c9) to head (e3a645f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5416      +/-   ##
==========================================
- Coverage   84.39%   84.38%   -0.01%     
==========================================
  Files         140      140              
  Lines       58645    58655      +10     
==========================================
+ Hits        49493    49496       +3     
- Misses       9152     9159       +7     

@DaveTwyman DaveTwyman self-assigned this Nov 12, 2024
@DaveTwyman DaveTwyman changed the title Fix: Modified return statement for sweep_around_axis and sweep_along_path so methods accept lists without creating error messages in AEDT. FIX: Modified return statement for sweep_around_axis and sweep_along_path so methods accept lists without creating error messages in AEDT. Nov 12, 2024
Copy link
Collaborator

@SMoraisAnsys SMoraisAnsys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greath @DaveTwyman this will solve the bug when users pass a list as input!
Could you add tests to ensure that everything works fine ?

Comment on lines +3217 to +3220
updated_obj = []
for sel_obj in assignment:
updated_obj.append(self.update_object(sel_obj))
return updated_obj
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
updated_obj = []
for sel_obj in assignment:
updated_obj.append(self.update_object(sel_obj))
return updated_obj
res = []
for sel_obj in assignment:
res.append(self.update_object(sel_obj))
return res

Just a minor refactor to use a "standard" name for return value.

Comment on lines +3272 to +3276
if isinstance(assignment, list):
updated_obj = []
for sel_obj in assignment:
updated_obj.append(self.update_object(sel_obj))
return updated_obj
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if isinstance(assignment, list):
updated_obj = []
for sel_obj in assignment:
updated_obj.append(self.update_object(sel_obj))
return updated_obj
if isinstance(assignment, list):
res = []
for sel_obj in assignment:
res.append(self.update_object(sel_obj))
return res

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error Messages when 'sweep_along_path' and 'sweep_around_axis' are passed more than one assignment
2 participants