coalib.bears.requirements package — coala 0.9.0.dev99999999999999 documentation

# coalib.bears.requirements package

## Submodules

## coalib.bears.requirements.DistributionRequirement module

class `coalib.bears.requirements.DistributionRequirement.` `DistributionRequirement`(**manager_commands)

  Bases: `coalib.bears.requirements.PackageRequirement.PackageRequirement`

  This class is a subclass of `PackageRequirement`. It specifices the proper type automatically.

## coalib.bears.requirements.GemRequirement module

class `coalib.bears.requirements.GemRequirement.` `GemRequirement`(package, version='', require='')

  Bases: `coalib.bears.requirements.PackageRequirement.PackageRequirement`

  This class is a subclass of `PackageRequirement`. It specifies the proper type for `ruby` packages automatically and provide a function to check for the requirement.

  `is_installed`()

    Checks if the dependency is installed.

    Parameters: | return – True if dependency is installed, false otherwise.

## coalib.bears.requirements.GoRequirement module

class `coalib.bears.requirements.GoRequirement.` `GoRequirement`(package, version='', flag='')

  Bases: `coalib.bears.requirements.PackageRequirement.PackageRequirement`

  This class is a subclass of `PackageRequirement`. It specifies the proper type for `go` packages automatically and provide a function to check for the requirement.

  `is_installed`()

    Checks if the dependency is installed.

    Parameters: | return – True if dependency is installed, false otherwise.

## coalib.bears.requirements.JuliaRequirement module

class `coalib.bears.requirements.JuliaRequirement.` `JuliaRequirement`(package, version='')

  Bases: `coalib.bears.requirements.PackageRequirement.PackageRequirement`

  This class is a subclass of `PackageRequirement`. It specifies the proper type for `julia` packages automatically and provide a function to check for the requirement.

  `is_installed`()

    Checks if the dependency is installed.

    Returns: | `True` if dependency is installed, `False` otherwise.

## coalib.bears.requirements.NpmRequirement module

class `coalib.bears.requirements.NpmRequirement.` `NpmRequirement`(package, version='')

  Bases: `coalib.bears.requirements.PackageRequirement.PackageRequirement`

  This class is a subclass of `PackageRequirement`. It specifies the proper type for `npm` packages automatically and provide a function to check for the requirement.

  `is_installed`()

    Checks if the dependency is installed.

    Parameters: | return – True if dependency is installed, false otherwise.

## coalib.bears.requirements.PackageRequirement module

class `coalib.bears.requirements.PackageRequirement.` `PackageRequirement`(type: str, package: str, version='')

  Bases: `object`

  This class helps keeping track of bear requirements. It should simply be appended to the REQUIREMENTS tuple inside the Bear class.

  Two `PackageRequirements` should always be equal if they have the same type, package and version:

      >>> pr1 = PackageRequirement('pip', 'coala_decorators', '0.1.0')
      >>> pr2 = PackageRequirement('pip', 'coala_decorators', '0.1.0')
      >>> pr1 == pr2
      True

  `is_installed`()

    Check if the requirement is satisfied.

        >>> PackageRequirement('pip',                                'coala_decorators',                                '0.2.1').is_installed()
        Traceback (most recent call last):
        ...
        NotImplementedError

    Returns: | Returns True if satisfied, False if not.

## coalib.bears.requirements.PipRequirement module

class `coalib.bears.requirements.PipRequirement.` `PipRequirement`(package, version='')

  Bases: `coalib.bears.requirements.PackageRequirement.PackageRequirement`

  This class is a subclass of `PackageRequirement`. It specifies the proper type for `python` packages automatically and provide a function to check for the requirement.

  `is_installed`()

    Checks if the dependency is installed.

    Parameters: | return – True if dependency is installed, false otherwise.

## coalib.bears.requirements.RscriptRequirement module

class `coalib.bears.requirements.RscriptRequirement.` `RscriptRequirement`(package, version='', flag='', repo='')

  Bases: `coalib.bears.requirements.PackageRequirement.PackageRequirement`

  This class is a subclass of `PackageRequirement`. It specifies the proper type for `R` packages automatically and provide a function to check for the requirement.

  `is_installed`()

    Checks if the dependency is installed.

    Parameters: | return – True if dependency is installed, false otherwise.

## Module contents