check for and fix mutable keyword defaults by murrayrm · Pull Request #794 · python-control/python-control
Navigation Menu
{{ message }}
python-control / python-control Public
- Notifications You must be signed in to change notification settings
- Fork 453
Merged
bnavigator merged 1 commit intopython-control:mainfrom
Nov 20, 2022Merged
check for and fix mutable keyword defaults#794
bnavigator merged 1 commit intopython-control:mainfrom
check for and fix mutable keyword defaults#794
bnavigator merged 1 commit intopython-control:mainfrom
Conversation
Copy link Copy Markdown
Member
murrayrm
commented
Nov 19, 2022
murrayrm
commented
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
changed the title
check for and fix mutable keyword args
check for and fix mutable keyword defaults
Copy link Copy Markdown
coveralls
commented
Nov 19, 2022
coveralls commented
Nov 19, 2022Copy link Copy Markdown
Contributor
roryyorke
commented
Nov 20, 2022
roryyorke commented
Nov 20, 2022Looks good to me. FWIW pylint has a warning for mutable args.
bnavigator
merged commit
2a799e9
into
python-control:main
murrayrm
added this to the
0.9.3 milestone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment