O2-DQ User Interface
1.0.0
Loading...
Searching...
No Matches
choicesCompleterList.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
# PYTHON_ARGCOMPLETE_OK
3
# -*- coding: utf-8 -*-
4
5
# Copyright 2019-2020 CERN and copyright holders of ALICE O2.
6
# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
7
# All rights not expressly granted are reserved.
8
#
9
# This software is distributed under the terms of the GNU General Public
10
# License v3 (GPL Version 3), copied verbatim in the file "COPYING".
11
#
12
# In applying this license CERN does not waive the privileges and immunities
13
# granted to it by virtue of its status as an Intergovernmental Organization
14
# or submit itself to any jurisdiction.
15
16
17
class
ChoicesCompleterList
(object):
18
19
"""
20
For the ChoicesCompleterList package argcomplete,
21
the TAB key
is
the
class
written for autocomplete and validation when an argument can take multiple values.
22
By default, the argcomplete package has the ChoicesCompleter Class,
23
which can only validate arguments that take an one value
and
allows autocomplete
with
the TAB key.
24
25
Args:
26
object (list): parserargs choices object
as
a list
27
"""
28
29
def
__init__
(self, choices):
30
self.
choices
= list(choices)
31
32
def
__call__
(self, **kwargs):
33
return
self.
choices
choicesCompleterList.ChoicesCompleterList
Definition:
choicesCompleterList.py:17
choicesCompleterList.ChoicesCompleterList.__init__
def __init__(self, choices)
Definition:
choicesCompleterList.py:29
choicesCompleterList.ChoicesCompleterList.choices
choices
Definition:
choicesCompleterList.py:30
choicesCompleterList.ChoicesCompleterList.__call__
def __call__(self, **kwargs)
Definition:
choicesCompleterList.py:32
extramodules
choicesCompleterList.py
Generated by
1.9.6