Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mat2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jvoisin
mat2
Commits
7697f9c0
Commit
7697f9c0
authored
6 years ago
by
Julien (jvoisin) Voisin
Browse files
Options
Downloads
Patches
Plain Diff
Improve the linters' coverage
parent
e9200835
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+7
-2
7 additions, 2 deletions
.gitlab-ci.yml
mat2
+2
-2
2 additions, 2 deletions
mat2
nautilus/nautilus_mat2.py
+1
-1
1 addition, 1 deletion
nautilus/nautilus_mat2.py
with
10 additions
and
5 deletions
.gitlab-ci.yml
+
7
−
2
View file @
7697f9c0
...
...
@@ -9,6 +9,8 @@ bandit:
script
:
# TODO: remove B405 and B314
-
apt-get -qqy update
-
apt-get -qqy install --no-install-recommends python3-bandit
-
bandit ./mat2 --format txt
-
bandit -r ./nautilus/ --format txt
-
bandit -r ./libmat2 --format txt --skip B101,B404,B603,B405,B314
pylint
:
...
...
@@ -16,14 +18,16 @@ pylint:
script
:
-
apt-get -qqy update
-
apt-get -qqy install --no-install-recommends pylint3 python3-mutagen python3-gi-cairo gir1.2-poppler-0.18 gir1.2-gdkpixbuf-2.0
-
pylint3 --extension-pkg-whitelist=cairo,gi ./libmat2
-
pylint3 --extension-pkg-whitelist=cairo,gi ./libmat2 ./mat2
# Once nautilus-python is in Debian, decomment it form the line below
-
pylint3 --extension-pkg-whitelist=Nautilus,GObject,Gtk,Gio,GLib,gi ./nautilus/nautilus_mat2.py
pyflakes
:
stage
:
linting
script
:
-
apt-get -qqy update
-
apt-get -qqy install --no-install-recommends pyflakes3
-
pyflakes3 ./libmat2 ./mat2 ./tests/
-
pyflakes3 ./libmat2 ./mat2 ./tests/
./nautilus
mypy
:
stage
:
linting
...
...
@@ -32,6 +36,7 @@ mypy:
-
apt-get -qqy install --no-install-recommends python3-pip
-
pip3 install mypy
-
mypy mat2 libmat2/*.py --ignore-missing-imports
-
mypy --ignore-missing-imports ./nautilus/nautilus_mat2.py
tests:debian
:
stage
:
test
...
...
This diff is collapsed.
Click to expand it.
mat2
+
2
−
2
View file @
7697f9c0
...
...
@@ -16,7 +16,7 @@ except ValueError as e:
__version__
=
'
0.2.0
'
def
__check_file
(
filename
:
str
,
mode
:
int
=
os
.
R_OK
)
->
bool
:
def
__check_file
(
filename
:
str
,
mode
:
int
=
os
.
R_OK
)
->
bool
:
if
not
os
.
path
.
exists
(
filename
):
print
(
"
[-] %s is doesn
'
t exist.
"
%
filename
)
return
False
...
...
@@ -37,7 +37,7 @@ def create_arg_parser():
parser
.
add_argument
(
'
-l
'
,
'
--list
'
,
action
=
'
store_true
'
,
help
=
'
list all supported fileformats
'
)
parser
.
add_argument
(
'
-c
'
,
'
--check-dependencies
'
,
action
=
'
store_true
'
,
help
=
'
check if MAT2 has all the dependencies it needs
'
)
help
=
'
check if MAT2 has all the dependencies it needs
'
)
info
=
parser
.
add_mutually_exclusive_group
()
...
...
This diff is collapsed.
Click to expand it.
nautilus/nautilus_mat2.py
+
1
−
1
View file @
7697f9c0
#!/usr/bin/env python3
# pylint: disable=unused-argument,
len-as-condition,arguments-diffe
r
# pylint: disable=unused-argument,
arguments-differ,no-self-use,no-name-in-module,import-erro
r
"""
Because writing GUI is non-trivial (cf. https://0xacab.org/jvoisin/mat2/issues/3),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment