Completed
Pull Request — master (#2387)
by Zatreanu
01:50
created

CondaRequirement   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 21
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 15 1
1
from coalib.bears.requirements.PackageRequirement import PackageRequirement
2
3
4
class CondaRequirement(PackageRequirement):
5
    """
6
    This class is a subclass of ``PackageRequirement``, and helps specifying
7
    requirements from ``conda``, without using the manager name.
8
    """
9
10
    def __init__(self, package, version=""):
11
        """
12
        Constructs a new ``CondaRequirement``, using the ``PackageRequirement``
13
        constructor.
14
15
        >>> pr = CondaRequirement('clang')
16
        >>> pr.manager
17
        'conda'
18
        >>> pr.package
19
        'clang'
20
21
        :param package: A string with the name of the package to be installed.
22
        :param version: A version string. Leave empty to specify latest version.
23
        """
24
        PackageRequirement.__init__(self, 'conda', package, version)
25