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
3636e617
Commit
3636e617
authored
3 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
fix conf2reST
parent
606a967c
No related branches found
No related tags found
2 merge requests
!78
🚑 fix conf2reST
,
!77
Topic/default/pylint
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NEWS.rst
+2
-0
2 additions, 0 deletions
NEWS.rst
odoo_scripts/conf2reST.py
+8
-11
8 additions, 11 deletions
odoo_scripts/conf2reST.py
odoo_scripts/config.py
+3
-0
3 additions, 0 deletions
odoo_scripts/config.py
with
13 additions
and
11 deletions
NEWS.rst
+
2
−
0
View file @
3636e617
...
...
@@ -17,6 +17,8 @@
Add new command and flags to run pylint on some modules.
Fix conf2reST.
14.0.0
------
...
...
This diff is collapsed.
Click to expand it.
odoo_scripts/conf2reST.py
+
8
−
11
View file @
3636e617
...
...
@@ -9,7 +9,8 @@
import
yaml
from
.config
import
Configuration
from
.parsing
import
apply
,
basic_parser
_logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -12,6 +13,6 @@
from
.parsing
import
apply
,
basic_parser
_logger
=
logging
.
getLogger
(
__name__
)
__version__
=
"
1.
0.1
"
__version__
=
"
1.
1.0
"
__date__
=
"
2016-07-15
"
...
...
@@ -17,5 +18,5 @@
__date__
=
"
2016-07-15
"
__updated__
=
"
202
0
-01-28
"
__updated__
=
"
202
2
-01-28
"
def
main
(
argv
=
None
):
# IGNORE:C0111
...
...
@@ -35,7 +36,7 @@
program_license
=
"""
%s
Created by Vincent Hatakeyama on %s.
Copyright 2016, 2019, 2020 XCG Consulting. All rights reserved.
Copyright 2016, 2019, 2020
, 2022
XCG Consulting. All rights reserved.
Licensed under the MIT License
...
...
@@ -69,11 +70,7 @@
"""
# read setup.cfg
parser
=
configparser
.
ConfigParser
()
setup_path
=
os
.
path
.
join
(
directory
,
"
setup.cfg
"
)
parser
.
read
(
setup_path
)
addon_dirs
=
set
(
os
.
path
.
dirname
(
path
)
for
path
in
parser
.
get
(
"
odoo_scripts
"
,
"
modules
"
).
split
()
)
c
=
Configuration
(
directory
)
addon_dirs
=
c
.
addons_path
# pip3 freeze
...
...
@@ -78,6 +75,6 @@
# pip3 freeze
reqs
=
dict
()
reqs
=
{}
pip_freeze
=
subprocess
.
check_output
([
"
pip3
"
,
"
freeze
"
])
for
element
in
pip_freeze
.
split
():
lib_and_version
=
element
.
decode
(
"
utf-8
"
).
split
(
"
==
"
)
...
...
@@ -111,7 +108,7 @@
group
=
"
modules
"
else
:
group
=
"
other
"
rst
[
group
][
section
]
=
dict
()
rst
[
group
][
section
]
=
{}
if
parser
.
has_option
(
section
,
"
track
"
):
rst
[
group
][
section
][
"
version
"
]
=
parser
.
get
(
section
,
"
track
"
)
if
parser
.
has_option
(
section
,
"
repository
"
):
...
...
This diff is collapsed.
Click to expand it.
odoo_scripts/config.py
+
3
−
0
View file @
3636e617
...
...
@@ -125,6 +125,9 @@
)
setattr
(
self
,
key
,
list
(
set_values
))
self
.
addons_path
=
{
os
.
path
.
dirname
(
module
)
for
module
in
self
.
modules
}
"""
Set of directory containing modules
"""
def
key_format
(
a_key
:
str
)
->
str
:
"""
Replace invalid characters in an attribute
"""
return
a_key
.
replace
(
"
-
"
,
"
_
"
).
replace
(
"
.
"
,
"
_
"
)
...
...
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