Skip to content

RF: call_from_parser - move code into "else" to simplify reading etc#6982

Merged
yarikoptic merged 1 commit into
datalad:maintfrom
yarikoptic:rf-logic
Aug 30, 2022
Merged

RF: call_from_parser - move code into "else" to simplify reading etc#6982
yarikoptic merged 1 commit into
datalad:maintfrom
yarikoptic:rf-logic

Conversation

@yarikoptic

Copy link
Copy Markdown
Member

If I read logic right, there should be no effect from this change whatsoever. But
in such formulation we avoid unnecessary assignment (value would be reassigned) for
the cases whenever the condition below it succeeds. So I decided to make that code
logic a bit more "kosher"

If I read logic right, there should be no effect from this change whatsoever. But
in such formulation we avoid unnecessary assignment (value would be reassigned) for
the cases whenever the condition below it succeeds. So I decided to make that code
logic a bit more "kosher"
@yarikoptic yarikoptic added the semver-internal Changes only affect the internal API label Aug 24, 2022
@codecov

codecov Bot commented Aug 24, 2022

Copy link
Copy Markdown

Codecov Report

Merging #6982 (8602917) into maint (29b42b4) will increase coverage by 0.98%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##            maint    #6982      +/-   ##
==========================================
+ Coverage   90.13%   91.12%   +0.98%     
==========================================
  Files         354      354              
  Lines       46326    46321       -5     
  Branches     6613     6612       -1     
==========================================
+ Hits        41755    42209     +454     
+ Misses       4554     4096     -458     
+ Partials       17       16       -1     
Impacted Files Coverage Δ
datalad/cli/exec.py 86.36% <100.00%> (ø)
datalad/_version.py 45.68% <0.00%> (-0.28%) ⬇️
datalad/utils.py 88.08% <0.00%> (ø)
datalad/tests/test_version.py 82.85% <0.00%> (ø)
datalad/runner/tests/test_witless_runner.py 95.39% <0.00%> (+2.40%) ⬆️
datalad/tests/utils.py 65.10% <0.00%> (+11.03%) ⬆️
datalad/tests/test_tests_utils.py 92.34% <0.00%> (+92.34%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@yarikoptic
yarikoptic requested a review from mih August 25, 2022 11:42
Comment thread datalad/cli/exec.py
if args.common_result_renderer != 'tailored' \
else getattr(cls, 'result_renderer', 'generic')
if '{' in args.common_result_renderer:
from .renderer import DefaultOutputRenderer

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

surprise (unrelated to this PR) -- this code block is reported to be untested!

Comment thread datalad/cli/exec.py
if args.common_result_renderer != 'tailored' \
else getattr(cls, 'result_renderer', 'generic')
if args.common_on_failure:
kwargs['on_failure'] = args.common_on_failure

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

another "core" code block without test! eh.

@yarikoptic
yarikoptic merged commit ee85954 into datalad:maint Aug 30, 2022
@github-actions

Copy link
Copy Markdown
Contributor

🚀 PR was released in 0.17.4 🚀

@yarikoptic
yarikoptic deleted the rf-logic branch October 14, 2022 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released semver-internal Changes only affect the internal API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant