Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Charles Burton
Gaudi
Commits
f66b3ec9
Commit
f66b3ec9
authored
Nov 28, 2017
by
Alex Pearce
Committed by
kreczko
Feb 14, 2019
Browse files
Use *args and **kwargs rather than apply.
apply has been deprecated since 2.3+.
parent
e6e57979
Changes
6
Hide whitespace changes
Inline
Side-by-side
GaudiKernel/scripts/genconfuser.py
View file @
f66b3ec9
...
...
@@ -17,7 +17,7 @@ from GaudiKernel.ConfigurableDb import cfgDb
logging
.
VERBOSE
=
(
logging
.
INFO
+
logging
.
DEBUG
)
/
2
logging
.
addLevelName
(
logging
.
VERBOSE
,
"VERBOSE"
)
logging
.
verbose
=
lambda
msg
,
*
args
,
**
kwargs
:
\
apply
(
logging
.
log
,
(
logging
.
VERBOSE
,
msg
)
+
args
,
kwargs
)
logging
.
log
(
logging
.
VERBOSE
,
msg
,
*
args
,
**
kwargs
)
def
_inheritsfrom
(
derived
,
basenames
):
...
...
GaudiKernel/scripts/make_patch.py
View file @
f66b3ec9
...
...
@@ -16,13 +16,13 @@ def command(cmd, *args, **kwargs):
d
.
update
(
kwargs
)
cmd
=
[
cmd
]
+
list
(
args
)
logging
.
debug
(
"Execute command: %r %r"
,
" "
.
join
(
cmd
),
kwargs
)
proc
=
apply
(
Popen
,
(
cmd
,
),
d
)
proc
=
Popen
(
cmd
,
**
d
)
return
proc
.
communicate
()
cmt
=
lambda
*
args
,
**
kwargs
:
apply
(
command
,
(
"cmt"
,
)
+
args
,
kwargs
)
cvs
=
lambda
*
args
,
**
kwargs
:
apply
(
command
,
(
"cvs"
,
)
+
args
,
kwargs
)
svn
=
lambda
*
args
,
**
kwargs
:
apply
(
command
,
(
"svn"
,
)
+
args
,
kwargs
)
cmt
=
lambda
*
args
,
**
kwargs
:
command
(
"cmt"
,
*
args
,
**
kwargs
)
cvs
=
lambda
*
args
,
**
kwargs
:
command
(
"cvs"
,
*
args
,
**
kwargs
)
svn
=
lambda
*
args
,
**
kwargs
:
command
(
"svn"
,
*
args
,
**
kwargs
)
def
broadcast_packages
():
...
...
GaudiPolicy/python/GaudiTesting/QMTTest.py
View file @
f66b3ec9
...
...
@@ -77,7 +77,7 @@ class QMTTest(BaseTest):
# positional or keyword
if
a
not
in
positional
and
a
not
in
kwargs
:
kwargs
[
a
]
=
self
.
extra_args
[
a
]
return
apply
(
self
.
callable
,
args
,
kwargs
)
return
self
.
callable
(
*
args
,
**
kwargs
)
# local names to be exposed in the script
stdout_ref
=
self
.
_expandReferenceFileName
(
self
.
reference
)
...
...
GaudiPolicy/qmtest_classes/GaudiTest.py
View file @
f66b3ec9
...
...
@@ -1540,8 +1540,7 @@ class GaudiExeTest(ExecTestBase):
# positional or keyword
if
a
not
in
positional
and
a
not
in
kwargs
:
kwargs
[
a
]
=
self
.
extra_args
[
a
]
return
apply
(
self
.
callable
,
args
,
kwargs
)
return
self
.
callable
(
*
args
,
**
kwargs
)
# local names to be exposed in the script
exported_symbols
=
{
"self"
:
...
...
GaudiPython/python/GaudiPython/Bindings.py
View file @
f66b3ec9
...
...
@@ -720,7 +720,7 @@ class iHistogramSvc(iDataSvc):
>>> svc = ...
>>> histo = svc.book( .... )
"""
return
apply
(
self
.
_ihs
.
book
,
args
)
return
self
.
_ihs
.
book
(
*
args
)
def
bookProf
(
self
,
*
args
):
"""
...
...
@@ -728,7 +728,7 @@ class iHistogramSvc(iDataSvc):
>>> svc = ...
>>> histo = svc.bookProf( .... )
"""
return
apply
(
self
.
_ihs
.
bookProf
,
args
)
return
self
.
_ihs
.
bookProf
(
*
args
)
def
__getitem__
(
self
,
path
):
"""
...
...
@@ -774,7 +774,7 @@ class iNTupleSvc(iDataSvc):
iDataSvc
.
__init__
(
self
,
name
,
ints
)
def
book
(
self
,
*
args
):
return
apply
(
self
.
_ints
.
book
,
args
)
return
self
.
_ints
.
book
(
*
args
)
def
defineOutput
(
self
,
files
,
typ
=
"Gaudi::RootCnvSvc"
):
""" Defines the mapping between logical names and the output file
...
...
GaudiRelease/svn_tag_release.py
View file @
f66b3ec9
...
...
@@ -18,7 +18,7 @@ from ConfigParser import ConfigParser
def
svn
(
*
args
,
**
kwargs
):
print
"> svn"
,
" "
.
join
(
args
)
return
apply
(
Popen
,
([
"svn"
]
+
list
(
args
),
),
kwargs
)
return
Popen
([
"svn"
]
+
list
(
args
),
**
kwargs
)
def
svn_ls
(
url
):
...
...
@@ -42,7 +42,7 @@ def svn_exists(url):
def
checkout_structure
(
url
,
proj
,
branch
):
def
checkout_level
(
base
):
dirs
=
[
"%s/%s"
%
(
base
,
d
)
for
d
in
svn_ls
(
base
)
if
d
.
endswith
(
"/"
)]
apply
(
svn
,
[
"up"
,
"-N"
]
+
dir
s
).
wait
()
svn
(
"up"
,
"-N"
,
*
arg
s
).
wait
()
return
dirs
root
=
basename
(
url
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment