Add linting with Pylint to build workflow

This commit is contained in:
Chris Mayo 2023-05-03 19:24:53 +01:00
parent 8820c8c0f0
commit e6da68b7f6
7 changed files with 18 additions and 1 deletions

View file

@ -150,6 +150,7 @@ jobs:
toxenv:
- flake8
- check-python-versions
- pylint
- yamllint
steps:

5
.pylintrc Normal file
View file

@ -0,0 +1,5 @@
[TYPECHECK]
ignored-modules=meliae, win32com.client, yappi
[VARIABLES]
additional-builtins=_, _n

View file

@ -41,7 +41,7 @@ ExcCacheList = [
EOFError,
# http errors
requests.exceptions.RequestException,
requests.packages.urllib3.exceptions.HTTPError,
requests.packages.urllib3.exceptions.HTTPError, # pylint: disable=no-member
# ftp errors
ftplib.Error,
# idna.encode(), called from socket.create_connection()

View file

@ -26,6 +26,7 @@ import requests
import warnings
warnings.simplefilter(
# pylint: disable=no-member
'ignore', requests.packages.urllib3.exceptions.InsecureRequestWarning
)

View file

@ -16,6 +16,8 @@
"""
Base URL handler.
"""
# pylint: disable=assignment-from-none, catching-non-exception, no-member
import sys
import os
import urllib.parse

View file

@ -16,6 +16,7 @@
"""
Test dummy object.
"""
# pylint: disable=no-member, not-callable
import unittest

View file

@ -33,6 +33,13 @@ deps = check-python-versions
skip_install = true
commands = check-python-versions {posargs}
[testenv:pylint]
deps =
pylint
-rrequirements.txt
skip_install = true
commands = pylint {posargs} -E linkcheck
[testenv:yamllint]
deps = yamllint
skip_install = true