Skip to content

refactor: use keyword-only arguments#342

Open
Snoopy1866 wants to merge 1 commit into
mainfrom
refactor-use-keyword-only
Open

refactor: use keyword-only arguments#342
Snoopy1866 wants to merge 1 commit into
mainfrom
refactor-use-keyword-only

Conversation

@Snoopy1866
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates numerous function signatures across the codebase to enforce keyword-only arguments by introducing the * separator. A review comment was provided identifying an inconsistency in the type hinting for the size parameter in src/pystatpower/models/correlation/inequality.py, where it is currently typed as an int instead of a float, and a code suggestion was provided to align it with other functions in the module.

def solve_null_correlation(
*,
correlation: float,
size: int,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The size parameter is typed as int here, but it is typed as float in other functions within the same file (e.g., solve_power and solve_correlation). For consistency across the module, it should be typed as float.

Suggested change
size: int,
size: float,

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