Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
* [pre-commit.ci] pre-commit autoupdate
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* manual fixes after configuration update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Anthony Sottile <asottile@umich.edu>
|
|
pre-commit: install typed dependencies in the mypy target
|
|
Otherwise, mypy doesn't know about them and their types are considered
Any.
|
|
We run mypy through pre-commit, and we don't keep duplicate targets in
tox for all of the other linters. Since this adds some (small)
maintenance overhead, remove it.
|
|
|
|
iniconfig now has typing stubs which reveal a couple issues.
|
|
|
|
|
|
There are some ones we *would* like to enforce, like
D401 First line should be in imperative mood
but have too many false positives, so I left them out.
|
|
We now only use `py.path.local`.
|
|
|
|
- also ran `pre-commit autoupdate`
- https://github.com/asottile/setup-py-upgrade
- https://github.com/asottile/setup-cfg-fmt
|
|
New errors:
testing/test_setupplan.py:104:15: E741 ambiguous variable name 'l'
testing/test_setupplan.py:107:15: E741 ambiguous variable name 'l'
extra/get_issues.py:48:29: E741 ambiguous variable name 'l'
testing/test_error_diffs.py:270:32: E741 ambiguous variable name 'l'
Not so sure about it but easier to just fix.
But more importantly, is a large amount of typing-related issues there
were fixed which necessitated noqa's which can now be removed.
|
|
|
|
|
|
|
|
https://mypy-lang.blogspot.com/2020/03/mypy-0770-released.html
|
|
The features branch is no more. Development of features is now also done
on master.
See https://github.com/pytest-dev/pytest/pull/6571.
|
|
Co-Authored-By: Daniel Hahler <git@thequod.de>
|
|
Conflicts:
src/_pytest/_code/code.py
src/_pytest/main.py
|
|
This also imports `TerminalWriter` explicitly via `_pytest._io`,
allowing for easier extending / replacing it.
|
|
Conflicts:
.github/workflows/main.yml
|
|
This is different from what pre-commit (in "linting") runs in that it
uses stubs from (test) dependencies.
It would make sense to run this on CI additionally (since there is no
"pre-commit --skip mypy", and a separate config is not worth it).
But currently it triggers a false positive though anyway
(https://github.com/erikrose/more-itertools/pull/374).
|
|
(cherry picked from commit 16ff9f591e38d1f2a79441f177130b1d89098c6e)
(cherry picked from commit 4848bbdf9a4480ec85b520c6f3224256f1346679)
|
|
|
|
|
|
This fixes some type: ignores due to typeshed update.
Newer mypy seem to ignore unannotated functions better, so add a few
minor annotations so that existing correct type:ignores make sense.
|
|
As discussed, sometimes we will need to introduce changes
which are not necessarily removals but might break existing
suites
|
|
|
|
Release notes:
https://mypy-lang.blogspot.com/2019/11/mypy-0.html
|
|
|
|
Now `tox -e docs` will also include the draft changelog for the
next version (locally only).
`CHANGELOG.rst` now only points to the changelog on READTHEDOCS so
sphinx diretives can be used.
Followup to https://github.com/pytest-dev/pytest/pull/6272
|
|
This configures the default role for interpreted text (single
backticks), avoiding the need to check for / enforce double backticks.
Fixes also one instance in the existing changelog:
- Detect `pytest_` prefixed hooks using the internal plugin manager since
``pluggy`` is deprecating the ``implprefix`` argument to ``PluginManager``.
(`#3487 <https://github.com/pytest-dev/pytest/issues/3487>`_)
|
|
This brings https://github.com/psf/black/pull/826, which helps with
https://github.com/psf/black/issues/601.
|
|
Changelogs:
http://mypy-lang.blogspot.com/2019/09/mypy-730-released.html
http://mypy-lang.blogspot.com/2019/10/mypy-0740-released.html
New errors:
src/_pytest/recwarn.py:77: error: Missing return statement
src/_pytest/recwarn.py:185: error: "bool" is invalid as return type for "__exit__" that always returns False
src/_pytest/recwarn.py:185: note: Use "typing_extensions.Literal[False]" as the return type or change it to "None"
src/_pytest/recwarn.py:185: note: If return type of "__exit__" implies that it may return True, the context manager may swallow exceptions
src/_pytest/recwarn.py:185: error: Return type "bool" of "__exit__" incompatible with return type "None" in supertype "catch_warnings"
src/_pytest/recwarn.py:230: error: "bool" is invalid as return type for "__exit__" that always returns False
src/_pytest/recwarn.py:230: note: Use "typing_extensions.Literal[False]" as the return type or change it to "None"
src/_pytest/recwarn.py:230: note: If return type of "__exit__" implies that it may return True, the context manager may swallow exceptions
src/_pytest/recwarn.py:230: error: Return type "bool" of "__exit__" incompatible with return type "None" in supertype "catch_warnings"
The errors are due to this new error:
https://mypy.readthedocs.io/en/latest/error_code_list.html#check-the-return-type-of-exit-exit-return
|
|
|
|
Conflicts:
src/_pytest/outcomes.py
|
|
|
|
This creates a separate section from 'features' for small changes which
don't usually require user intervention, such as:
* Human readable session duration
* New junitxml fields
* Improved colors in terminal
* etc.
The idea is to better match user expectations about new actual
features in the "Features" section of the changelog.
|
|
Several conflicts, mostly due to 2c402f4bd.
Conflicts:
.pre-commit-config.yaml
src/_pytest/outcomes.py
src/_pytest/python_api.py
tox.ini
|
|
Release notes: http://mypy-lang.blogspot.com/2019/07/mypy-0720-released.html
|
|
This makes testing/ actually pick up the pytest imports -- otherwise
they are opaque and we don't actually test the types.
A single run is also a bit faster and simpler. The original reason why
we split it is no longer relevant (we fixed the problems).
|
|
Resolves #3840
|
|
Add a very lax mypy configuration, add it to tox -e linting, and
fix/ignore the few errors that come up. The idea is to get it running
before diving in too much.
This enables:
- Progressively adding type annotations and enabling more strict
options, which will improve the codebase (IMO).
- Annotating the public API in-line, and eventually exposing it to
library users who use type checkers (with a py.typed file).
Though, none of this is done yet.
Refs https://github.com/pytest-dev/pytest/issues/3342.
|
|
Add a very lax mypy configuration, add it to tox -e linting, and
fix/ignore the few errors that come up. The idea is to get it running
before diving in too much.
This enables:
- Progressively adding type annotations and enabling more strict
options, which will improve the codebase (IMO).
- Annotating the public API in-line, and eventually exposing it to
library users who use type checkers (with a py.typed file).
Though, none of this is done yet.
Refs https://github.com/pytest-dev/pytest/issues/3342.
|
|
|