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
- Replaced unittest.mock with pytest fixtures for better test isolation and readability.
- Simplified test cases by using parameterized tests.
- Added `requests-mock` dependency to `pyproject.toml` and `poetry.lock`.
- Removed redundant helper functions and classes.
Seems like readthedocs build expects docs dependencies to be available
as an extra, see one of the failing builds: https://app.readthedocs.org/projects/beets/builds/26079213/.
You can see this has been failing due to missing 'pydata_sphinx_theme':
raise ThemeError(__('no theme named %r found (missing theme.toml?)') % name)
sphinx.errors.ThemeError: no theme named 'pydata_sphinx_theme' found (missing theme.toml?)
Theme error:
no theme named 'pydata_sphinx_theme' found (missing theme.toml?)
* Replace `noqa` comments in `assert...` method definitions with
a configuration option to ignore these names.
* Use the `__all__` variable to specify importable items from the
module, replacing `*` imports and `noqa` comments for unused imports.
* Address issues with poorly named variables and methods by renaming
them appropriately.
- Fix imports
- Fix pytest issues
- Do not assign lambda as variable
- Use isinstance instead of type to check type
- Rename ambiguously named variables
- Name custom errors with Error suffix
This reverts commit fc373f5fef8c8dd1656dfdf31c14b3365a0a75bc.
See CONTRIBUTING.rst which has tools setup guidelines for users. They
are expected to install both poetry and poethepoet globally in their
system.
This reverts commit c3b6f07c4336e6639e4597a800700820155ad294.
This commit hardcoded the paths that `isort` and `black` checks. This
means that the `check-format` job will act on the entire codebase
instead of only changed files. We need to define a `path` argument with
a default value in order to achieve the above.
Regarding "." vs "beets beetsplug test", the intention behind using "."
was to also check python files like `docs/conf.py` and
`extra/release.py` which I presume we would also want to format
properly.
Unfortunately tox does not play very nicely with Poetry. Tox was mostly
useful since it managed virtual environments, however now this is done
by Poetry.
Thus we do not anymore need it since we can run our commands using
`poetry run`. I have extended the internal helper tool 'project' with
those commands that have previously been run using tox.