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
54e50450
Commit
54e50450
authored
6 years ago
by
Julien (jvoisin) Voisin
Browse files
Options
Downloads
Patches
Plain Diff
Fix the return code on parsers' list display
parent
433609f8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mat2
+3
-3
3 additions, 3 deletions
mat2
with
3 additions
and
3 deletions
mat2
+
3
−
3
View file @
54e50450
...
...
@@ -118,7 +118,7 @@ def clean_meta(filename: str, is_lightweight: bool, policy: UnknownMemberPolicy)
def
show_parsers
()
->
bool
:
def
show_parsers
():
print
(
'
[+] Supported formats:
'
)
formats
=
set
()
# Set[str]
for
parser
in
parser_factory
.
_get_parsers
():
# type: ignore
...
...
@@ -133,7 +133,6 @@ def show_parsers() -> bool:
continue
formats
.
add
(
'
- %s (%s)
'
%
(
mtype
,
'
,
'
.
join
(
extensions
)))
print
(
'
\n
'
.
join
(
sorted
(
formats
)))
return
True
def
__get_files_recursively
(
files
:
List
[
str
])
->
Generator
[
str
,
None
,
None
]:
...
...
@@ -156,7 +155,8 @@ def main() -> int:
if
not
args
.
files
:
if
args
.
list
:
return
show_parsers
()
show_parsers
()
return
0
elif
args
.
check_dependencies
:
print
(
"
Dependencies required for MAT2 %s:
"
%
__version__
)
for
key
,
value
in
sorted
(
check_dependencies
().
items
()):
...
...
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