Make sure the CLI precision is used when creating report. Fixes #674.#684
Make sure the CLI precision is used when creating report. Fixes #674.#684
Conversation
| """Base class for different plugin implementations.""" | ||
|
|
||
| def __init__(self, cov_source, cov_report, cov_config, cov_append, cov_branch, config=None, nodeid=None): | ||
| cov: coverage.Coverage | None |
There was a problem hiding this comment.
Perhaps move this into the initializer? Any reason to have it right here?
There was a problem hiding this comment.
It's just a type annotation - ":" doesn't assign anything to the "cov" class attribute. I added it mostly to make some things easier in my editor.
| def __init__(self, cov_source, cov_report, cov_config, cov_append, cov_branch, config=None, nodeid=None): | ||
| cov: coverage.Coverage | None | ||
|
|
||
| def __init__(self, cov_source, cov_report, cov_config, cov_append, cov_branch, cov_precision, config=None, nodeid=None): |
There was a problem hiding this comment.
It's probably best to make the new arg last + maybe kw-only so that it isn't a breaking change in the signature.
There was a problem hiding this comment.
Well now that you mention it, it does look odd doesn't it. Such a large number of positional always leads to some trouble. Funny thing, the config and nodeid are always passed. It was like that since the first commit where this was set to be a common lib for both pytest and nose: 7c6448d
…ore clarity. The config/nodeid were never meant to be optional for this internal class - the intention there was to signal that they can be None values.
30dcf1d to
2e9d704
Compare
No description provided.