Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

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

bug fix for help from typing package, add test for optional and union#513

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Jemeljanov wants to merge3 commits intogoogle:master
base:master
Choose a base branch
Loading
fromJemeljanov:bug-fix-typing-package

Conversation

@Jemeljanov
Copy link

@JemeljanovJemeljanov commentedMay 21, 2024
edited
Loading

Closes#508

Fixed bug where objects from typing instance were not displayed correctly mentioned in#508 and also Union types.

Added tests for typing.Union and typing.Optional

Other notes

Removed comment as the edge case mentioned is handled by new code.

Used arg_type = repr(arg_type).replace('typing.', '') to output a shorter message for user

@google-cla
Copy link

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View thisfailed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@dbieber
Copy link
Collaborator

Thanks for putting this together! At a quick glance, this LGTM. One comment inline above.

@Jemeljanov
Copy link
Author

Jemeljanov commentedMay 22, 2024
edited
Loading

@dbieber it was a little bit different behaviour now it will be Optional[Union[int, str]], the Optional is because the default is None.

Now it is more in compliance with the typing in python code and a more robust version than with regular expression.

Additional check is to prevent the Optional repetition (one added from python-fire the other from typing package).

@JemeljanovJemeljanov requested a review fromdbieberMay 23, 2024 15:36
@dbieber
Copy link
Collaborator

I only just enabled CI for pull requests so this didn't surface earlier -- it looks like there are some test failures.

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

Reviewers

@dbieberdbieberAwaiting requested review from dbieber

1 more reviewer

@BordaBordaBorda approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Optional type args are mistyped in help

3 participants

@Jemeljanov@dbieber@Borda

[8]ページ先頭

©2009-2025 Movatter.jp