Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package configuration #4

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

RNKuhns
Copy link
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 Note

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

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

Check notice

Code scanning / CodeQL

Returning tuples with varying lengths Note

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

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

Check notice

Code scanning / CodeQL

Returning tuples with varying lengths Note

GlobalConfigParamSetting.get_expected_type returns
tuple of size 0
and
tuple of size 1
.
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 Error test

Call to
function set_config
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 Error test

Keyword argument 'do_something_else' is not a supported parameter name of
function set_config
.
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.

1 participant