Commit a44f87a4 authored by xa's avatar xa

typing

parent 8026654e
layout python3
......@@ -57,3 +57,6 @@ docs/_build/
# PyBuilder
target/
.mypy_cache/
.pytest_cache/
.vscode/
\ No newline at end of file
......@@ -4,17 +4,11 @@ before_script:
- python -m pip install -e .
- python -m pip install -r requirements-test.txt
python3.3 tests:
python3 tests:
script:
- py.test --cov knighted --cov-report term-missing tests/
tags:
- python3.3
python3.4 tests:
script:
- py.test --cov knighted --cov-report term-missing tests/
tags:
- python3.4
- python3
publish to pypi:
type: deploy
......@@ -23,7 +17,7 @@ publish to pypi:
- python setup.py sdist bdist_wheel
- twine upload -u $PYPI_USER -p $PYPI_PASSWORD dist/*
tags:
- python3.4
- python3
only:
- /^v[\d\.]+.*$/
allow_failure: true
from __future__ import annotations
import asyncio
import logging
from abc import ABCMeta
......@@ -6,7 +7,7 @@ from itertools import chain
from weakref import WeakKeyDictionary
from functools import wraps
logger = logging.getLogger(__name__)
logger = logging.getLogger("knighted")
class Factory:
......@@ -113,7 +114,7 @@ class Injector(metaclass=ABCMeta):
return response
def partial(self, func):
"""Resolves lately dependancies.
"""Resolves lately dependencies.
Returns:
callable: the service partially resolved
......@@ -139,7 +140,7 @@ class Injector(metaclass=ABCMeta):
return wrapper
ANNOTATIONS = WeakKeyDictionary()
ANNOTATIONS: WeakKeyDictionary[str, "Annotation"] = WeakKeyDictionary()
Annotation = namedtuple('Annotation', 'pos_notes kw_notes')
......
......@@ -10,3 +10,8 @@ description-file = README.rst
[flake8]
exclude = _version.py
max-complexity = 10
[doc8]
max-line-length=99
verbose=1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment