Remove 'files' configuration from the config to make sure that mypy runs
quicker when invoked from the editor (where ideally it should only check
the file being edited).
Remove 'disallow_any_generics' from the config since we already have
this configured centrally.
And finally, do not allow variable redefinitions.
which added some mypy config to pyproject.toml, leading to mypy ignoring
setup.cfg
(this shows up in CI output for #5701, but is not very visible
since we currently ignore mypy errors)
Related: https://github.com/beetbox/beets/pull/5728
See https://realpython.com/python-namespace-package.
This setup is backwards-compatible, so plugins using the old
pkgutil-based setup will continue working fine.
This setup has an advantage where external plugins will now be able to
import modules from 'beetsplug' package for typing purposes. Previously,
mypy could not resolve these modules due to presence of `__init__.py`.
Improve requests performance with requests.Session which uses connection
pooling for repeated requests to the same host.
Additionally, this centralizes request configuration, making sure that
we use the same timeout and provide beets user agent for all requests.
Add `pytest-cov` which automatically measures coverage while tests are
executing and update tox and ci build configuration accordingly.
Add configuration for coverage:
1. Enable analysing logical branches
2. Save coverage details as HTML for local development use
3. Configure the HTML output to include coverage context: on the
right-hand side of each covered code line there is an expandable
section which lists every test that ran that line.
External Python packages interfacing beets may want to use an in-memory
beets library instance for testing beets-related code.
The `TestHelper` class is very helpful for this purpose.
Previously `TestHelper` was located in the `test/` directory.
Now it is part of `beets` itself (`beets.test.helper.TestHelper`) and
can be easily imported.
These references were out-of-date as of #4951. Not sure why we were
listing these individually in the first place; it's not like we want to
be strict about docstrings in tests...
This plugin uses librosa to automatically calculate the BPM for a track.
It is based on the keyfinder plugin, and rounds the BPM to an int.
Co-authored-by: Adrian Sampson <adrian@radbox.org>
The new error <https://github.com/PyCQA/pep8-naming/pull/157> strikes me
as a little overzealous: while most exceptions are errors, there are
some Exception subclasses that are *not* properly considered errors
(e.g., when they're only a base class for other error classes).
As described in PyCQA/pycodestyle#598, pycodestyle has exposed a new
error for "ambiguous variable names." I really wish this project were
less eager to add new warnings of questionable value that are enabled by
default...
The code that relied on this in the tests was removed in 84c82cc44b
I don't think this was a good global option anyways, so I don't see us
returning to it.
This was discovered by @JesseWeinstein
- Add support for Python 3 testing.
- Add Python 3.3, 3.4 and 3.5 tests to Travis and AppVeyor.
- Allow arguments to be passed to tox from test matrix.
- Simplify tox configuration so that we now only have `test`, `flake8`
and `docs` tasks.