| Conditions | 3 | 
| Total Lines | 19 | 
| Lines | 0 | 
| Ratio | 0 % | 
| 1 | from coalib.misc.Decorators import (enforce_signature, | ||
| 10 | @enforce_signature | ||
| 11 | def __init__(self, file: str, line=None, column=None): | ||
| 12 | """ | ||
| 13 | Creates a new result position object that represents the position of a | ||
| 14 | result in the source code. | ||
| 15 | |||
| 16 | :param file: The filename or None. | ||
| 17 | :param line: The line in file or None, the first line is 1. | ||
| 18 | :param column: The column indicating the character. The first one | ||
| 19 | in a line is 1. | ||
| 20 | :raises TypeError: Raised when line or columns are no integers. | ||
| 21 | :raises ValueError: If a line number without a file is provided. | ||
| 22 | """ | ||
| 23 | TextPosition.__init__(self, line, column) | ||
| 24 | |||
| 25 | if file is None and line is not None: | ||
| 26 |             raise ValueError("A line must be associated to a file.") | ||
| 27 | |||
| 28 | self._file = file | ||
| 29 | |||
| 33 |