mirror of
https://github.com/certbot/certbot.git
synced 2025-07-30 09:03:08 +03:00
Fix "lint" and "providedBy" build errors
This commit is contained in:
20
linter_plugin.py
Normal file
20
linter_plugin.py
Normal file
@ -0,0 +1,20 @@
|
||||
"""Let's Encrypt ACME PyLint plugin.
|
||||
|
||||
http://docs.pylint.org/plugins.html
|
||||
|
||||
"""
|
||||
from astroid import MANAGER
|
||||
from astroid import nodes
|
||||
|
||||
|
||||
def register(unused_linter):
|
||||
"""Register this module as PyLint plugin."""
|
||||
|
||||
def _transform(cls):
|
||||
if (('Message' in cls.basenames or 'ImmutableMap' in cls.basenames or
|
||||
'util.ImmutableMap' in cls.basenames) and (cls.slots() is not None)):
|
||||
for slot in cls.slots():
|
||||
cls.locals[slot.value] = [nodes.EmptyNode()]
|
||||
|
||||
|
||||
MANAGER.register_transform(nodes.Class, _transform)
|
Reference in New Issue
Block a user