check for and fix mutable keyword defaults by murrayrm · Pull Request #794 · python-control/python-control

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@murrayrm

Copy link Copy Markdown

Member

This PR adds a check for keyword arguments in all functions that are initialized to mutables and fixes a few errors that were found. Setting keyword defaults to mutables is still allowed by listing the function in a table. This should help introduction of errors if a mutable is used as a default keyword in future updates.

@murrayrm murrayrm changed the title check for and fix mutable keyword args check for and fix mutable keyword defaults

Nov 19, 2022

@coveralls

Copy link Copy Markdown

Coverage Status

Coverage increased (+0.0007%) to 94.8% when pulling 4968cb3 on murrayrm:mutable_default_args-13Nov2022 into 2dc409b on python-control:main.

@roryyorke

Copy link Copy Markdown

Contributor

Looks good to me. FWIW pylint has a warning for mutable args.

@bnavigator bnavigator merged commit 2a799e9 into python-control:main

Nov 20, 2022

@murrayrm murrayrm added this to the 0.9.3 milestone

Dec 24, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

0.9.3

Development

Successfully merging this pull request may close these issues.

4 participants

@murrayrm @coveralls @roryyorke @bnavigator