Skip to content

Fix #315 Change the _KeywordOnlyArguments filtering condition#316

Merged
dbieber merged 2 commits into
google:masterfrom
xavierfigueroav:flags-swapped-in-usage-message
Apr 16, 2022
Merged

Fix #315 Change the _KeywordOnlyArguments filtering condition#316
dbieber merged 2 commits into
google:masterfrom
xavierfigueroav:flags-swapped-in-usage-message

Conversation

@xavierfigueroav

@xavierfigueroav xavierfigueroav commented Feb 4, 2021

Copy link
Copy Markdown
Contributor

Fix #315 by changing the _KeywordOnlyArguments filtering condition.

The condition checked for the presence of the flag in the kwonlydefaults field of FullArgSpec to consider it as required, but that actually proved the opossite.

@HLA55

HLA55 commented Dec 30, 2021

Copy link
Copy Markdown

Up

@dbieber

dbieber commented Apr 16, 2022

Copy link
Copy Markdown
Collaborator

I'm going to merge this and then clean things up in a follow-up PR.

The change we'll need to make is def identity2(self, *, alpha, beta='0'): needs to be moved to test_components_py3, since this isn't valid syntax for python 2.

@dbieber dbieber merged commit 09f836e into google:master Apr 16, 2022
dbieber added a commit that referenced this pull request Apr 16, 2022
* #316 adds a test using Python 3 only features; this CL makes that test only run for Python 3 versions.
@dbieber

dbieber commented Apr 16, 2022

Copy link
Copy Markdown
Collaborator

^Done in #389.

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

Labels

cla: yes Author has signed CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optional and required flags are swapped in the "Usage" message

3 participants