-
Notifications
You must be signed in to change notification settings - Fork 4
job_list: Adjusting to remove unused varible #2190
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: master
Are you sure you want to change the base?
Conversation
VindeeR
commented
Mar 6, 2025
•
edited
Loading
edited
- Vulture not used variables fixed
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2190 +/- ##
=======================================
Coverage 55.33% 55.34%
=======================================
Files 72 72
Lines 17232 17229 -3
Branches 3350 3350
=======================================
Hits 9535 9535
+ Misses 6859 6856 -3
Partials 838 838
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
autosubmit/job/job_list.py
Outdated
@@ -2798,7 +2789,7 @@ def update_list(self, as_conf, store_change=True, fromSetStatus=False, submitter | |||
parent.status == Status.COMPLETED or parent.status == Status.SKIPPED or parent.status == Status.FAILED] | |||
if len(tmp2) == len(job.parents): | |||
for parent in job.parents: | |||
if () and parent.status != Status.COMPLETED: | |||
if parent.status != Status.COMPLETED: |
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.
Huh! Interesting!
kinow@ranma:~$ python3
Python 3.12.3 (main, Feb 4 2025, 14:48:35) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> if () and 1 > 0:
... print('ok')
...
>>>
So ()
is treated as false. I guess that makes sense, as ()
is an empty tuple,
>>> type(())
<class 'tuple'>
As this is changing the condition in this line, do you think we could get a test added to this PR, @VindeeR ? I think we discussed simplifying the pull requests, but this one looks a bit dangerous to merge without the test (not sure if the code is working as expected or will cause some issue to surface now that the False
is out of the if
statement).
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'll start working on it as soon as I finish my current fix
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.
Can you rebase it, please, @VindeeR ?
5123d01
to
8fcba49
Compare