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

Reduce mypy errors (Part 3) #9852

Closed
twisted-trac opened this issue Jun 17, 2020 · 3 comments
Closed

Reduce mypy errors (Part 3) #9852

twisted-trac opened this issue Jun 17, 2020 · 3 comments

Comments

@twisted-trac
Copy link

rodrigc's avatar @rodrigc reported
Trac ID trac#9852
Type enhancement
Created 2020-06-17 20:08:06Z

This is a continuation of ticket:9851

If I run:

tox -e mypy

I get a lot of errors complaining about methods in zope interfaces that have not been implemented. For example:

src/twisted/words/protocols/jabber/sasl_mechanisms.py:47:1: error: 'Anonymous' is missing following 'ISASLMechanism' interface members: getResponse.  [misc]
src/twisted/words/protocols/jabber/sasl_mechanisms.py:61:1: error: 'Plain' is missing following 'ISASLMechanism' interface members: getResponse.  [misc]
src/twisted/internet/_dumbwin32proc.py:110:1: error: 'Process' is missing following 'twisted.internet.interfaces.ITransport' interface members: getHost, getPeer.
src/twisted/internet/abstract.py:151:1: error: 'FileDescriptor' is missing following 'ITransport' interface members: getHost, getPeer.  [misc]
src/twisted/internet/process.py:623:1: error: 'Process' is missing following 'twisted.internet.interfaces.ITransport' interface members: getHost, getPeer.  [misc]
src/twisted/internet/process.py:959:1: error: 'PTYProcess' is missing following 'twisted.internet.interfaces.ITransport' interface members: getHost, getPeer.  [misc]
src/twisted/internet/process.py:959:1: error: 'PTYProcess' is missing following 'IProcessTransport' interface members: closeChildFD, writeToChild.  [misc]
src/twisted/internet/_resolver.py:31:1: error: 'HostResolution' is missing following 'IHostResolution' interface members: cancel.  [misc]
src/twisted/internet/base.py:504:1: error: 'ReactorBase' is missing following 'IReactorCore' interface members: run.  [misc]
src/twisted/internet/_newtls.py:162:1: error: 'ConnectionMixin' is missing following 'twisted.internet.interfaces.ITCPTransport' interface members: getHost, getPeer,

It would be good to clean some of these errors up.

Searchable metadata
trac-id__9852 9852
type__enhancement enhancement
reporter__rodrigc rodrigc
priority__normal normal
milestone__publish_types publish types
branch__ 
branch_author__ 
status__closed closed
resolution__fixed fixed
component__core core
keywords__None None
time__1592424486134964 1592424486134964
changetime__1594360403322407 1594360403322407
version__None None
owner__Craig_Rodrigues__rodrigc_____ Craig Rodrigues <rodrigc@...>

@twisted-trac
Copy link
Author

rodrigc's avatar @rodrigc commented

#1298

@twisted-trac
Copy link
Author

rodrigc's avatar @rodrigc commented

Approved here: #1298 (review)

@twisted-trac
Copy link
Author

rodrigc's avatar @rodrigc set owner to @rodrigc
@rodrigc set status to closed

In changeset 066b440

#!CommitTicketReference repository="" revision="066b4401bafbef65a5d9af5785189702f993673a"
Merge pull request #1298 from twisted/9852-rodrigc-mypy

[mypy] Implement some functions defined in zope interfaces

Author: rodrigc
Reviewer: adiroiban
Fixes: ticket:9852

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

No branches or pull requests

1 participant