Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Odoo scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo scripts
Commits
7c7994ffc45e
Commit
7c7994ffc45e
authored
6 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
run isort when running a project to detect problems before CI
parent
839e06c99b04
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker_dev_start.py
+20
-0
20 additions, 0 deletions
docker_dev_start.py
with
20 additions
and
0 deletions
docker_dev_start.py
+
20
−
0
View file @
7c7994ff
...
...
@@ -68,6 +68,16 @@
_logger
.
warning
(
'
No flake8 in PATH
'
)
def
isort
():
"""
Run isort if found
"""
if
which
(
'
isort
'
):
_logger
.
info
(
'
Running isort
'
)
call
([
'
isort
'
,
'
-c
'
])
else
:
_logger
.
warning
(
'
No isort in PATH
'
)
def
main
(
argv
=
None
):
# IGNORE:C0111
"""
Parse arguments and launch conversion
"""
...
...
@@ -197,6 +207,12 @@
dest
=
'
flake8
'
,
)
parser
.
add_argument
(
'
--no-isort
'
,
help
=
"
Do not run isort
"
,
action
=
'
store_false
'
,
dest
=
'
isort
'
,
)
parser
.
add_argument
(
'
--odoo-help
'
,
help
=
"
Pass --help to odoo binary [default: %(default)s]
"
,
action
=
'
store_true
'
,
...
...
@@ -275,6 +291,7 @@
use_host_network
=
nmspc
.
host_network
start_postgresql
=
nmspc
.
start_postgresql
run_flake8
=
nmspc
.
flake8
run_isort
=
nmspc
.
isort
odoo_help
=
nmspc
.
odoo_help
dev
=
nmspc
.
dev
restore_filename
=
nmspc
.
DUMP
...
...
@@ -598,6 +615,9 @@
if
run_flake8
:
flake8
()
if
run_isort
:
isort
()
if
dev
:
if
odoo_type
in
(
'
odoo11
'
,
'
odoo10
'
):
# ipdb should not be run if not interactive
...
...
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