fix: consider finished files and hide them from output by default #10

Merged
mdk merged 1 commit from mattwang44/potodo:fix/issue-7 into main 2024-11-22 13:28:07 +01:00
Contributor

resolve #7

resolve #7
fix: consider finished files and hide them from output by default
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
b1477983e6
Contributor

Not sure if there's an elegant way to do it, but I would prefer the overall percentage to always take completed files into consideration in completion calculations, independently from showing the completed files in detailed output or not. I think it's more natural that way.

Not sure if there's an elegant way to do it, but I would prefer the overall percentage to always take completed files into consideration in completion calculations, independently from showing the completed files in detailed output or not. I think it's more natural that way.
Author
Contributor

Not sure if there's an elegant way to do it, but I would prefer the overall percentage to always take completed files into consideration in completion calculations, independently from showing the completed files in detailed output or not. I think it's more natural that way.

@maciek Not sure if I understand you correctly, but I believe this change below in select() would have the calculation considered for those finished files. The rest changes are to hide them from output by default and show them if --show-finished is given.

	    if (
-            po_file.percent_translated == 100
-            or po_file.percent_translated < args.above
+            po_file.percent_translated < args.above
            or po_file.percent_translated > args.below
        ):
            return False
> Not sure if there's an elegant way to do it, but I would prefer the overall percentage to always take completed files into consideration in completion calculations, independently from showing the completed files in detailed output or not. I think it's more natural that way. @maciek Not sure if I understand you correctly, but I believe this change below in `select()` would have the calculation considered for those finished files. The rest changes are to hide them from output by default and show them if `--show-finished` is given. ```diff if ( - po_file.percent_translated == 100 - or po_file.percent_translated < args.above + po_file.percent_translated < args.above or po_file.percent_translated > args.below ): return False ```
Contributor

Ah, ok, thanks for explaining. Sorry for confusion! I wasn't careful enough reading through changes. I like the proposed behaviour! 👍

Ah, ok, thanks for explaining. Sorry for confusion! I wasn't careful enough reading through changes. I like the proposed behaviour! 👍
maciek approved these changes 2024-11-20 11:03:18 +01:00
maciek left a comment

Looks good to me!

Looks good to me!
mdk merged commit b1477983e6 into main 2024-11-22 13:28:07 +01:00
mdk deleted branch fix/issue-7 2024-11-22 13:28:14 +01:00
Owner

Released as 0.22.0, thanks for the PR and review!

Released as 0.22.0, thanks for the PR and review!
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AFPy/potodo!10
No description provided.