Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the match args to use the correct attributes #128

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

guacs
Copy link
Contributor

@guacs guacs commented Jul 4, 2023

The 'value' property is deprecated and instead 'ok_value' and 'err_value' must be used for 'Ok' and 'Err'. Due to the value for __match_args__ not being updated, the deprecation warning was being raised when the user is using the match statement.

This fixes #127.

The 'value' property is deprecated and instead 'ok_value' and 'err_value' must be used for 'Ok' and 'Err'.
@francium
Copy link
Member

francium commented Jul 4, 2023

Thanks you @guacs
I'll do a full review and test of this PR shortly

@codecov-commenter
Copy link

Codecov Report

Merging #128 (d32dc16) into master (854abaa) will not change coverage.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #128   +/-   ##
=======================================
  Coverage   98.96%   98.96%           
=======================================
  Files           3        3           
  Lines         385      385           
=======================================
  Hits          381      381           
  Misses          4        4           
Impacted Files Coverage Δ
src/result/result.py 98.74% <100.00%> (ø)

@francium francium merged commit 896c4b1 into rustedpy:master Jul 4, 2023
4 checks passed
francium added a commit that referenced this pull request Jul 4, 2023
@guacs guacs deleted the match-value-fix branch July 4, 2023 22:16
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.

DeprecationWarning being raised when using match statement
3 participants