Skip to content

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

VindeeR
Copy link
Contributor

@VindeeR VindeeR commented Mar 6, 2025

  • Vulture not used variables fixed

@VindeeR VindeeR added enhancement New feature or request Refactor labels Mar 6, 2025
@VindeeR VindeeR self-assigned this Mar 6, 2025
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.34%. Comparing base (94a366c) to head (fc9bdda).

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           
Flag Coverage Δ
fast-tests 55.34% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -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:
Copy link
Member

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).

Copy link
Contributor Author

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

@VindeeR VindeeR requested a review from dbeltrankyl March 10, 2025 13:51
Copy link
Member

@kinow kinow left a 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 ?

@VindeeR VindeeR changed the title Adjusting to remove unused varible in job_list job_list: Adjusting to remove unused varible Mar 13, 2025
@kinow
Copy link
Member

kinow commented Mar 13, 2025

More conflicts 😬

image

@VindeeR VindeeR force-pushed the vulture_job_list_fix branch from 5123d01 to 8fcba49 Compare March 13, 2025 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants