Skip to content

Commit 7ebaadf

Browse files
committed
Initial commit
0 parents  commit 7ebaadf

26 files changed

+1240
-0
lines changed

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[report]
2+
exclude_lines =
3+
raise NotImplementedError

.flake8

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[flake8]
2+
max-line-length = 88
3+
ignore = E501, E203, W503
4+
per-file-ignores = __init__.py:F401
5+
exclude =
6+
.git
7+
__pycache__
8+
setup.py
9+
build
10+
dist
11+
releases
12+
.venv
13+
.tox
14+
.mypy_cache
15+
.pytest_cache
16+
.vscode
17+
.github

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
*.pyc
2+
3+
# Packages
4+
*.egg
5+
*.egg-info
6+
dist
7+
build
8+
.cache
9+
10+
# Installer logs
11+
pip-log.txt
12+
13+
# Unit test / coverage reports
14+
.coverage
15+
.tox
16+
nosetests.xml
17+
18+
.DS_Store
19+
.idea/*
20+
.vscode/*
21+
.python-version
22+
23+
test.py
24+
/test
25+
.pytest_cache
26+
pip-wheel-metadata
27+
setup.py

.pre-commit-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: stable
4+
hooks:
5+
- id: black
6+
7+
- repo: https://gitlab.com/pycqa/flake8
8+
rev: 3.7.8
9+
hooks:
10+
- id: flake8
11+
12+
- repo: https://github.com/pre-commit/mirrors-isort
13+
rev: v4.3.21
14+
hooks:
15+
- id: isort
16+
additional_dependencies: [toml]
17+
exclude: ^.*/?setup\.py$
18+
19+
- repo: https://github.com/pre-commit/pre-commit-hooks
20+
rev: v2.3.0
21+
hooks:
22+
- id: trailing-whitespace
23+
exclude: ^tests/.*/fixtures/.*
24+
- id: end-of-file-fixer
25+
exclude: ^tests/.*/fixtures/.*
26+
- id: debug-statements

LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2020 Sébastien Eustace
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Whitespace-only changes.

crashtest/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.2.1"

crashtest/contracts/__init__.py

Whitespace-only changes.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from typing import List
2+
3+
from .solution import Solution
4+
5+
6+
class BaseSolution(Solution):
7+
def __init__(self, title: str = None, description: str = None) -> None:
8+
self._title = title
9+
self._description = description
10+
self._links = []
11+
12+
@property
13+
def solution_title(self) -> str:
14+
return self._title
15+
16+
@property
17+
def solution_description(self) -> str:
18+
return self._description
19+
20+
@property
21+
def documentation_links(self) -> List[str]:
22+
return self._links
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from typing import List
2+
3+
from .solution import Solution
4+
5+
6+
class HasSolutionsForException:
7+
def can_solve(self, exception: Exception) -> bool:
8+
raise NotImplementedError()
9+
10+
def get_solutions(self, exception: Exception) -> List[Solution]:
11+
raise NotImplementedError()

0 commit comments

Comments
 (0)