Skip to content

Commit

Permalink
Add missing ssl enums to astroid/brain
Browse files Browse the repository at this point in the history
astroid's brian_ssl wrapper lacks several enums constructed in the core
ssl module. This eventually affects pylint's ability to parse code which
makes use of these enums:

> example.py:9:6: E1101: Module 'ssl' has no 'VerifyMode' member (no-member)

Adding these enums to brain_ssl fixes the reported issue against pylint.

See also: pylint-dev/pylint#3691

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
  • Loading branch information
cipherboy committed Feb 4, 2022
1 parent b8c3683 commit f96cce2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Release date: TBA
Closes #1282
Ref #1103

* Adds missing enums from ``ssl`` module

Closes PyCQA/pylint#3691

What's New in astroid 2.9.4?
============================
Release date: TBA
Expand Down
2 changes: 2 additions & 0 deletions astroid/brain/brain_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def ssl_transform():
from _ssl import _OPENSSL_API_VERSION
from _ssl import PROTOCOL_SSLv23, PROTOCOL_TLSv1, PROTOCOL_TLSv1_1, PROTOCOL_TLSv1_2
from _ssl import PROTOCOL_TLS, PROTOCOL_TLS_CLIENT, PROTOCOL_TLS_SERVER
from _ssl import AlertDescription, SSLErrorNumber, TLSVersion, VerifyMode
from _ssl import Options, VerifyFlags
"""
)

Expand Down

0 comments on commit f96cce2

Please sign in to comment.