Skip to content

Add package configuration#4

Open
RNKuhns wants to merge 3 commits intopredict-ably:mainfrom
RNKuhns:main
Open

Add package configuration#4
RNKuhns wants to merge 3 commits intopredict-ably:mainfrom
RNKuhns:main

Conversation

@RNKuhns
Copy link
Copy Markdown
Member

@RNKuhns RNKuhns commented Nov 6, 2023

Reference Issues/PRs

What does this implement/fix? Explain your changes.

Does your contribution introduce a new dependency? If yes, which one?

What should a reviewer concentrate their feedback on?

Any other comments?

PR checklist

For all contributions
  • I've reviewed the project documentation on contributing
  • I've added myself to the list of contributors.
  • The PR title starts with either [ENH], [CI/CD], [MNT], [DOC], or [BUG] indicating whether
    the PR topic is related to enhancement, CI/CD, maintenance, documentation, or a bug.
For code contributions
  • Unit tests have been added covering code functionality
  • Appropriate docstrings have been added (see documentation standards)
  • New public functionality has been added to the API Reference

default_value: Any
allowed_values: Optional[Union[Tuple[Any, ...], List[Any]]]

def _get_values(self, param: str) -> Tuple[Any, ...]:

Check notice

Code scanning / CodeQL

Returning tuples with varying lengths

GlobalConfigParamSetting._get_values returns [tuple of size 0](1) and [tuple of size 1](2).
else:
return (param_values,)

def get_allowed_values(self) -> Tuple[Any, ...]:

Check notice

Code scanning / CodeQL

Returning tuples with varying lengths

GlobalConfigParamSetting.get_allowed_values returns [tuple of size 0](1) and [tuple of size 1](2).
"""
return self._get_values("allowed_values")

def get_expected_type(self) -> Tuple[type, ...]:

Check notice

Code scanning / CodeQL

Returning tuples with varying lengths

GlobalConfigParamSetting.get_expected_type returns [tuple of size 0](1) and [tuple of size 1](2).
dh.set_config(do_something_else=True)

with pytest.raises(TypeError):
dh.set_config(True)

Check failure

Code scanning / CodeQL

Wrong number of arguments in a call

Call to [function set_config](1) with too many arguments; should be no more than 0.
def test_set_config_invalid_keyword_argument():
"""Test set_config behavior when invalid keyword argument passed."""
with pytest.raises(TypeError):
dh.set_config(do_something_else=True)

Check failure

Code scanning / CodeQL

Wrong name for an argument in a call

Keyword argument 'do_something_else' is not a supported parameter name of [function set_config](1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants