Completed
Push — develop ( b4a21c...b1df34 )
by Jace
02:37
created

MappingError

Complexity

Total Complexity 0

Size/Duplication

Total Lines 2
Duplicated Lines 0 %

Test Coverage

Coverage 100%
Metric Value
wmc 0
dl 0
loc 2
ccs 1
cts 1
cp 1
1
"""Custom exceptions."""
2
3 1
from abc import ABCMeta
4
5 1
import yaml
0 ignored issues
show
Configuration introduced by
The import yaml could not be resolved.

This can be caused by one of the following:

1. Missing Dependencies

This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

2. Missing __init__.py files

This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.

Loading history...
6
7
8 1
class Error(Exception, metaclass=ABCMeta):
9
    """Base class for all YORM exceptions."""
10
11
12 1
class FileMissingError(Error, FileNotFoundError):
13
    """A file was expected to exist."""
14
15
16 1
class FileAlreadyExistsError(Error, FileExistsError):
17
    """A file was not expected to exist."""
18
19
20 1
class FileDeletedError(Error, FileNotFoundError):
21
    """Text could not be read from a deleted file."""
22
23
24 1
class ContentError(Error, yaml.error.YAMLError, ValueError):
25
    """Text could not be parsed as valid YAML."""
26
27
28 1
class ConversionError(Error, ValueError):
29
    """Value could not be converted to the specified type."""
30
31
32 1
class MappingError(Error):
33
    """The API was called incorrectly."""
34