Skip to content

Make all function annotations accessible from builtins complete#113

Merged
gvanrossum merged 3 commits intopython:masterfrom
ddfisher:master
Mar 12, 2016
Merged

Make all function annotations accessible from builtins complete#113
gvanrossum merged 3 commits intopython:masterfrom
ddfisher:master

Conversation

@ddfisher
Copy link
Contributor

Precursor to python/mypy/pull/1285

def zfill(self, width: int) -> bytearray: ...
@staticmethod
@classmethod
def fromhex(self, x: str) -> bytearray: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact bytes.fromhex() is a static method. Also, the first arg should be named cls.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to @staticmethod and removed first argument.

@gvanrossum
Copy link
Member

Are you ready to push your fixes to the PR?

@ddfisher
Copy link
Contributor Author

Pushed.

@gvanrossum
Copy link
Member

Test fail.

@ddfisher
Copy link
Contributor Author

Fixed!

gvanrossum added a commit that referenced this pull request Mar 12, 2016
Make all function annotations accessible from builtins complete
@gvanrossum gvanrossum merged commit a946304 into python:master Mar 12, 2016
momandine pushed a commit to momandine/typeshed that referenced this pull request Jul 5, 2016
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.

2 participants