#21 Unreachable code cleanups
Merged a year ago by adamwill. Opened a year ago by nielsenb.
fedora-qa/ nielsenb/relval unreachable-cleanups  into  main

file modified
+6 -7
@@ -209,13 +209,12 @@ 

          release = int(get_response(prompt, helptext, accepted=validrels))

  

      while not version_set:

-         if not version_type:

-             prompt = (

-                 "Would you like to report a result for a milestone "

-                 "(c)ompose or a (n)ightly compose? "

-             )

-             helptext = "Please choose (c)ompose or (n)ightly."

-             version_type = get_response(prompt, helptext, accepted=("c", "n"))

+         prompt = (

+             "Would you like to report a result for a milestone "

+             "(c)ompose or a (n)ightly compose? "

+         )

+         helptext = "Please choose (c)ompose or (n)ightly."

+         version_type = get_response(prompt, helptext, accepted=("c", "n"))

  

          if version_type == "c":

              prompt = "(B)eta\n(R)C\nWhich milestone would you like to report a milestone for? "

This is a followup from #20.

Cleanup unreachble code for coverage reasons.

Remove if not version_type conditional:

version_type is explicitly set to '', and not '' will always evaluate to True.

Remove elif in check:

A ValueError is raised if both accepted and accfunc are None, so the elif was not necessary.

This looks fine, I'm just waiting for us to thrash out #20 before merging. Thanks.

rebased onto a0a7b9a

a year ago

This looks fine, I'm just waiting for us to thrash out #20 before merging. Thanks.

Rebased onto main.

Can you rebase this again? I fixed the first one a different way to make pylint happy, and I've moved the source. On the rebase we should get a CI run, I hope.

rebased onto b45aa96

a year ago

Can you rebase this again? I fixed the first one a different way to make pylint happy, and I've moved the source. On the rebase we should get a CI run, I hope.

I sortof made a hash of that because I haven't finished my first coffee, but I'm pretty sure I got it right before I pushed.

Not sure where the CI is to see if it's running or not.

hmm, it should be here, so I must've missed something.

ooh, there it is. If you can force push this again somehow it should trigger now, I hope.

rebased onto 21de2bc

a year ago

ooh, there it is. If you can force push this again somehow it should trigger now, I hope.

How about now?

huh. what am I missing? I have this working on a bunch of other repos. gr.

oh hey, I missed putting one of the CI files in the PR. Sigh. Let's see here.

OK, I got it now. rebase once more. sorry!

rebased onto 59dc68b

a year ago

It's working, it's working!

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

1 new commit added

  • Correct formatting.
a year ago

It's not working...

Any interest in setting up coverage checks / automatic formatting with pre-commit hooks? Solve this kind of thing before hitting the CI.

Build succeeded.

Well, the way I do CI, you can run the checks locally just by running tox. As long as you're on a distro released since about 2019 it should work fine.

rebased onto 0fe88a2

a year ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

Pull-Request has been merged by adamwill

a year ago
Metadata