Skip to content

Improve error messages and add docs for new native function machinery #592

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

Merged
merged 1 commit into from
Mar 4, 2019

Conversation

OddCoincidence
Copy link
Contributor

@OddCoincidence OddCoincidence commented Mar 3, 2019

Some examples:

Welcome to the magnificent Rust Python 0.0.1 interpreter
>>>>> str.endswith()
Traceback (most recent call last):
  File <stdin>, line 0, in <module>
TypeError: Expected at least 2 arguments (0 given)

>>>>> '1234'.endswith(4)
Traceback (most recent call last):
  File <stdin>, line 0, in <module>
TypeError: Expected type <class 'str'>, not <class 'int'>

>>>>> '1234'.endswith('4', 0, 4, 'extra')
Traceback (most recent call last):
  File <stdin>, line 0, in <module>
TypeError: Expected at most 4 arguments (5 given)

@codecov-io
Copy link

Codecov Report

Merging #592 into master will increase coverage by 0.41%.
The diff coverage is 17.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #592      +/-   ##
==========================================
+ Coverage   41.66%   42.07%   +0.41%     
==========================================
  Files          74       74              
  Lines       16768    16870     +102     
  Branches     4397     4432      +35     
==========================================
+ Hits         6986     7098     +112     
+ Misses       7772     7767       -5     
+ Partials     2010     2005       -5
Impacted Files Coverage Δ
vm/src/pyobject.rs 58.58% <16.66%> (-0.76%) ⬇️
vm/src/function.rs 66.66% <33.33%> (-4.77%) ⬇️
vm/src/stdlib/io.rs 33.49% <0%> (+6.47%) ⬆️
vm/src/stdlib/re.rs 58.62% <0%> (+10.34%) ⬆️
vm/src/stdlib/socket.rs 70.97% <0%> (+11.3%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b7c0f7...4e822ed. Read the comment docs.

@cthulahoops cthulahoops merged commit 839f906 into master Mar 4, 2019
@windelbouwman windelbouwman deleted the joey/improved-arg-errors branch March 23, 2019 10:49
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.

3 participants