Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gaudi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Gaudi
Gaudi
Commits
58d8b69a
Commit
58d8b69a
authored
1 year ago
by
Frank Winklmeier
Browse files
Options
Downloads
Patches
Plain Diff
flake8 fixes for various scripts
parent
3b4a1272
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1441
Add flake8 pre-commit hook
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GaudiKernel/scripts/merge_confdb2_parts
+4
-4
4 additions, 4 deletions
GaudiKernel/scripts/merge_confdb2_parts
GaudiPolicy/scripts/quick-merge
+2
-2
2 additions, 2 deletions
GaudiPolicy/scripts/quick-merge
GaudiProfiling/scripts/GaudiProfiler
+2
-3
2 additions, 3 deletions
GaudiProfiling/scripts/GaudiProfiler
with
8 additions
and
9 deletions
GaudiKernel/scripts/merge_confdb2_parts
+
4
−
4
View file @
58d8b69a
#!/usr/bin/env python3
#####################################################################################
# (c) Copyright 1998-202
0
CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-202
3
CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
...
...
@@ -15,8 +15,8 @@ import shelve
import
sys
from
optparse
import
OptionParser
from
GaudiKernel.DataHandle
import
DataHandle
from
GaudiKernel.GaudiHandles
import
*
from
GaudiKernel.DataHandle
import
DataHandle
# noqa: F401
from
GaudiKernel.GaudiHandles
import
*
# noqa: F401 F403
parser
=
OptionParser
(
# desc='simple script to merge files',
usage
=
"
%prog [options] input1 input2 ... [output|--output output]
"
...
...
@@ -72,7 +72,7 @@ if __name__ == "__main__":
open
(
output
+
"
.db
"
,
"
w
"
)
# make a dummy ".db" version
elif
os
.
path
.
exists
(
output
+
"
.db
"
):
# this Python uses dbm.ndbm
open
(
output
,
"
w
"
)
# make a dummy version without the artificial ".db"
except
:
except
Exception
:
if
os
.
path
.
exists
(
output
):
os
.
remove
(
output
)
raise
This diff is collapsed.
Click to expand it.
GaudiPolicy/scripts/quick-merge
+
2
−
2
View file @
58d8b69a
#!/usr/bin/env python
#####################################################################################
# (c) Copyright 1998-20
19
CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-20
23
CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
...
...
@@ -53,7 +53,7 @@ if __name__ == "__main__":
with
open
(
output
,
"
wb
"
)
as
out
:
for
input
in
inputs
:
out
.
writelines
(
open
(
input
,
"
rb
"
))
except
:
except
Exception
:
if
os
.
path
.
exists
(
output
):
os
.
remove
(
output
)
raise
This diff is collapsed.
Click to expand it.
GaudiProfiling/scripts/GaudiProfiler
+
2
−
3
View file @
58d8b69a
#!/usr/bin/env python
#####################################################################################
# (c) Copyright 1998-20
19
CERN for the benefit of the LHCb and ATLAS collaborations #
# (c) Copyright 1998-20
23
CERN for the benefit of the LHCb and ATLAS collaborations #
# #
# This software is distributed under the terms of the Apache version 2 licence, #
# copied verbatim in the file "LICENSE". #
...
...
@@ -14,7 +14,6 @@ from __future__ import print_function
import
os
import
shutil
import
sys
import
time
import
xml.parsers.expat
from
subprocess
import
Popen
...
...
@@ -62,7 +61,7 @@ if __name__ == "__main__":
cmask
=
[]
invmask
=
[]
sampling_period
=
[]
if
type
([])
!=
typ
e
(
es
.
EVENT
):
if
not
isinstanc
e
(
es
.
EVENT
,
list
):
es
.
EVENT
=
[
es
.
EVENT
]
for
x
in
range
(
len
(
es
.
EVENT
)):
counter
.
append
(
es
.
EVENT
[
x
].
NAME
)
...
...
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