mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Add linting with Pylint to build workflow
This commit is contained in:
parent
8820c8c0f0
commit
e6da68b7f6
7 changed files with 18 additions and 1 deletions
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
|
|
@ -150,6 +150,7 @@ jobs:
|
|||
toxenv:
|
||||
- flake8
|
||||
- check-python-versions
|
||||
- pylint
|
||||
- yamllint
|
||||
|
||||
steps:
|
||||
|
|
|
|||
5
.pylintrc
Normal file
5
.pylintrc
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[TYPECHECK]
|
||||
ignored-modules=meliae, win32com.client, yappi
|
||||
|
||||
[VARIABLES]
|
||||
additional-builtins=_, _n
|
||||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import requests
|
|||
import warnings
|
||||
|
||||
warnings.simplefilter(
|
||||
# pylint: disable=no-member
|
||||
'ignore', requests.packages.urllib3.exceptions.InsecureRequestWarning
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
"""
|
||||
Base URL handler.
|
||||
"""
|
||||
# pylint: disable=assignment-from-none, catching-non-exception, no-member
|
||||
|
||||
import sys
|
||||
import os
|
||||
import urllib.parse
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
"""
|
||||
Test dummy object.
|
||||
"""
|
||||
# pylint: disable=no-member, not-callable
|
||||
|
||||
import unittest
|
||||
|
||||
|
|
|
|||
7
tox.ini
7
tox.ini
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue