Skip to content

Commit

Permalink
test: update to pylint 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen committed Oct 3, 2023
1 parent 0141194 commit 96b5edf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,8 @@ def getDirectoryMetaParameters(self, dpath, credDict, inherited=True):
return S_OK({})
metaDict = {}
for _dID, key, value in result["Value"]:
if key in metaDict:
if isinstance(metaDict[key], list):
metaDict[key].append(value)
else:
metaDict[key] = [metaDict[key]].append(value)
if isinstance(metaDict.get(key), list):
metaDict[key].append(value)
else:
metaDict[key] = value

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,8 @@ def __getFileMetaParameters(self, fileID, credDict):
return S_OK({})
metaDict = {}
for fileID, key, value in result["Value"]:
if key in metaDict:
if isinstance(metaDict[key], list):
metaDict[key].append(value)
else:
metaDict[key] = [metaDict[key]].append(value)
if isinstance(metaDict.get(key), list):
metaDict[key].append(value)
else:
metaDict[key] = value

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ def parseSwitches():
args = Script.getPositionalArgs()
if not args:
error("Missing mandatory 'query' argument")
DIRACExit(1)
elif not args[0].lower() in ("select", "add", "delete"):
error("Missing mandatory argument")
else:
query = args[0].lower()
DIRACExit(1)

query = args[0].lower()

switches = dict(Script.getUnprocessedSwitches())

Expand Down

0 comments on commit 96b5edf

Please sign in to comment.