FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pyt/pydocstyle.py at 8githubScanRefactor · python-security/pyt · GitHub
python-security
pyt
Repository navigation
Code
Issues
26
(26)
Pull requests
2
(2)
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
pyt
/
pydocstyle.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (19 loc) · 699 Bytes
Breadcrumbs
pyt
/
pydocstyle.py
Copy path
File metadata and controls
28 lines (19 loc) · 699 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import
re
import
subprocess
import
sys
import
os
os
.
chdir
(
os
.
path
.
join
(
'pyt'
))
try
:
docstyle
=
subprocess
.
run
([
"pydocstyle"
,
"--ignore=D105,D203,D212,D213"
],
stderr
=
subprocess
.
PIPE
,
universal_newlines
=
True
)
except
FileNotFoundError
:
print
(
'Error: Install pydocstyle with pip for python 3.'
' Something like: "sudo python -m pip install pydocstyle"'
)
sys
.
exit
()
lines
=
re
.
split
(
'
\n
'
,
docstyle
.
stderr
)
errors
=
zip
(
lines
[
0
::
2
],
lines
[
1
::
2
])
errors
=
[
x
+
"
\n
\t
"
+
y
for
x
,
y
in
errors
]
errors
=
[
error
for
error
in
errors
if
'visit_'
not
in
error
]
for
error
in
errors
:
print
(
error
+
'
\n
'
)
print
(
"Total errors: {}"
.
format
(
len
(
errors
)))
Back
|
FazBrowse Home
|
New Git URL