Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2c6d68e
Up our mypy game.
wsanchez Oct 28, 2019
0c84fb6
pin pyflakes pending a release with https://github.com/PyCQA/pyflakes…
wsanchez Oct 28, 2019
96d796d
value is optional
wsanchez Oct 28, 2019
4e77d89
Add more type hints
wsanchez Nov 4, 2019
86a4ad1
Extra space, ew
wsanchez Nov 5, 2019
51d24e8
On review, looks value=None isn't meant to be allowed and the check f…
wsanchez Nov 5, 2019
e88b73a
typo
wsanchez Nov 5, 2019
f835853
Add disallow_any_generics to TODO list
wsanchez Nov 20, 2019
163b746
Merge branch 'master' into mypy
wsanchez Nov 20, 2019
47f5e53
Make `self._instance` optional.
wsanchez Nov 20, 2019
8b85c82
Less of `if TYPE_CHECKING`
wsanchez Nov 20, 2019
c56e21f
Merge branch 'master' into mypy
wsanchez Nov 20, 2019
8aeef1b
Less `if TYPE_CHECKING`
wsanchez Nov 20, 2019
7431070
Unrelated.
wsanchez Nov 20, 2019
7e04736
Add type hints for txrequest files.
wsanchez Nov 21, 2019
28f5ee7
Remove cast
wsanchez Nov 21, 2019
027d55b
Merge branch 'master' into mypy-txrequest
wsanchez Nov 21, 2019
e237808
Add type hints for _decorators.py
wsanchez Nov 21, 2019
444cfde
Merge branch 'master' into mypy
glyph Nov 28, 2019
0918cc4
Merge branch 'master' into mypy
wsanchez Dec 10, 2019
9e2fede
Merge branch 'master' into mypy-decorators
wsanchez Dec 10, 2019
2cd3b05
Merge branch 'master' into mypy-txrequest
wsanchez Dec 10, 2019
ebc9597
Nix Python 2.7
wsanchez Dec 10, 2019
6f8b85e
Merge branch 'master' into py27
wsanchez Dec 17, 2019
6b50023
Missed merge item
wsanchez Dec 17, 2019
0078c88
Merge branch 'master' into mypy-decorators
wsanchez Dec 17, 2019
1dc4033
lint
wsanchez Dec 17, 2019
1508dd2
Merge branch 'master' into mypy-txrequest
wsanchez Dec 17, 2019
0c1b9d8
Merge branch 'master' into mypy
wsanchez Dec 17, 2019
b59e579
Merge branch 'mypy-decorators' into mypy
wsanchez Dec 17, 2019
62cb2d7
Merge branch 'mypy-form' into mypy
wsanchez Dec 17, 2019
2a5fbce
Merge branch 'mypy-strategies' into mypy
wsanchez Dec 17, 2019
1b466de
Merge branch 'mypy-txrequest' into mypy
wsanchez Dec 17, 2019
6ea8b14
Merge branch 'master' into py27
glyph Jan 14, 2020
0ac5623
Merge branch 'master' into mypy
wsanchez Jan 24, 2020
6a3e9e9
Merge branch 'master' into py27
wsanchez Jan 24, 2020
1c70f91
Merge branch 'master' into py27
wsanchez Jan 25, 2020
5e1581e
Merge branch 'master' into mypy
wsanchez Jan 25, 2020
a253556
Merge branch 'master' into py27
wsanchez Jan 29, 2020
0c4692c
Merge branch 'master' into mypy
wsanchez Jan 29, 2020
fb402e7
Remove Python 2-only code paths.
wsanchez Jan 29, 2020
ff50296
Merge branch 'master' into mypy
wsanchez Mar 24, 2020
14be66d
Merge branch 'master' into mypy
wsanchez Mar 24, 2020
8b69217
Merge branch 'mypy' into py27
wsanchez Mar 24, 2020
cdfad9e
Merge branch 'master' into py27
wsanchez Mar 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 2 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ matrix:
- python: 3.8
env: TOXENV=mypy

- python: 2.7
env: TOXENV=coverage-py27-tw171,codecov
- python: 2.7
env: TOXENV=coverage-py27-tw184,codecov
- python: 2.7
env: TOXENV=coverage-py27-twcurrent,codecov

- python: 3.5
env: TOXENV=coverage-py35-tw171,codecov
- python: 3.5
Expand Down Expand Up @@ -63,13 +56,6 @@ matrix:
- python: 3.8
env: TOXENV=coverage-py38-twcurrent,codecov

- python: pypy
env: TOXENV=coverage-pypy2-tw171,codecov
- python: pypy
env: TOXENV=coverage-pypy2-tw184,codecov
- python: pypy
env: TOXENV=coverage-pypy2-twcurrent,codecov

- python: pypy3
env: TOXENV=coverage-pypy3-tw171,codecov
- python: pypy3
Expand All @@ -79,19 +65,16 @@ matrix:

# Test against Twisted trunk in case something in development breaks us.
# This is allowed to fail below, since the bug may be in Twisted.
- python: 2.7
env: TOXENV=coverage-py27-twtrunk,codecov
- python: 3.8
env: TOXENV=coverage-py38-twtrunk,codecov

- python: 2.7
- python: 3.8
env: TOXENV=docs
- python: 2.7
- python: 3.8
env: TOXENV=docs-linkcheck

allow_failures:
# Tests against Twisted trunk are allow to fail, as they are not supported.
- env: TOXENV=coverage-py27-twtrunk,codecov
- env: TOXENV=coverage-py38-twtrunk,codecov

# This depends on external web sites, so it's allowed to fail.
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ Klein is an open source project that welcomes contributions of all kinds coming
Getting started
===============

Here is a list of shell commands that will install the dependencies of Klein, run the test suite with Python 2.7 and the current version of Twisted, compile the documentation, and check for coding style issues with flake8.
Here is a list of shell commands that will install the dependencies of Klein, run the test suite with Python 3.8 and the current version of Twisted, compile the documentation, and check for coding style issues with flake8.

.. code-block:: shell

pip install --user tox
tox -e py27-twcurrent
tox -e py38-twcurrent
tox -e docs
tox -e flake8

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
Expand Down
18 changes: 16 additions & 2 deletions src/klein/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@

from typing import TYPE_CHECKING

from ._app import Klein, handle_errors, route, run, subroute, urlFor, url_for
from ._app import (
Klein,
KleinErrorHandler,
KleinRenderable,
KleinRoute,
handle_errors,
route,
run,
subroute,
urlFor,
url_for,
)
from ._dihttp import RequestComponent, RequestURL, Response
from ._form import Field, FieldValues, Form, RenderableForm
from ._plating import Plating
Expand All @@ -14,12 +25,15 @@
# Inform mypy of import shenanigans.
from .resource import _SpecialModuleObject

resource = _SpecialModuleObject()
resource = _SpecialModuleObject(None)
else:
from . import resource

__all__ = (
"Klein",
"KleinErrorHandler",
"KleinRenderable",
"KleinRoute",
"Plating",
"Field",
"FieldValues",
Expand Down
Loading