Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.0.35: pytest --black fails #125

Open
kloczek opened this issue May 13, 2022 · 0 comments
Open

0.0.35: pytest --black fails #125

kloczek opened this issue May 13, 2022 · 0 comments

Comments

@kloczek
Copy link

kloczek commented May 13, 2022

Despite that in requirements-dev.txt black module is listed pytest fails in two files

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-material-0.0.35-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-material-0.0.35-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --black
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/sphinx-material-0.0.35
plugins: anyio-3.5.0, black-0.3.12
collected 6 items

setup.py F                                                                                                                                                           [ 16%]
versioneer.py .                                                                                                                                                      [ 33%]
docs/conf.py F                                                                                                                                                       [ 50%]
sphinx_material/__init__.py .                                                                                                                                        [ 66%]
sphinx_material/_version.py .                                                                                                                                        [ 83%]
tools/sphinx-build-script.py .                                                                                                                                       [100%]

================================================================================= FAILURES =================================================================================
____________________________________________________________________________ Black format check ____________________________________________________________________________
--- /home/tkloczko/rpmbuild/BUILD/sphinx-material-0.0.35/setup.py       2021-10-06 16:28:04 +0000
+++ /home/tkloczko/rpmbuild/BUILD/sphinx-material-0.0.35/setup.py       2022-05-13 12:16:59.302907 +0000
@@ -33,7 +33,11 @@
         "Framework :: Sphinx :: Theme",
         "Topic :: Documentation :: Sphinx",
         "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
     ],
-    entry_points={"sphinx.html_themes": ["sphinx_material = sphinx_material",]},
+    entry_points={
+        "sphinx.html_themes": [
+            "sphinx_material = sphinx_material",
+        ]
+    },
 )

____________________________________________________________________________ Black format check ____________________________________________________________________________
--- /home/tkloczko/rpmbuild/BUILD/sphinx-material-0.0.35/docs/conf.py   2022-05-13 12:16:52.957095 +0000
+++ /home/tkloczko/rpmbuild/BUILD/sphinx-material-0.0.35/docs/conf.py   2022-05-13 12:17:00.172114 +0000
@@ -10,11 +10,12 @@
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
 #
 import os
 import sys
-sys.path.insert(0, os.path.abspath('..'))
+
+sys.path.insert(0, os.path.abspath(".."))

 from distutils.version import LooseVersion
 import os

 import sphinx_material

============================================================================= warnings summary =============================================================================
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:146
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:146
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:146
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:146
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:146
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:146
  /usr/lib/python3.8/site-packages/_pytest/nodes.py:146: PytestDeprecationWarning: <class 'pytest_black.BlackItem'> is not using a cooperative constructor and only takes {'parent', 'fspath'}.
  See https://docs.pytest.org/en/stable/deprecations.html#constructors-of-custom-pytest-node-subclasses-should-take-kwargs for more details.
    warnings.warn(

../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:264
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:264
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:264
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:264
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:264
../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:264
  /usr/lib/python3.8/site-packages/_pytest/nodes.py:264: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to BlackItem is deprecated. Please use the (path: pathlib.Path) argument instead.
  See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path
    return cls._create(parent=parent, **kw)

../../../../../usr/lib/python3.8/site-packages/_pytest/nodes.py:708
  /usr/lib/python3.8/site-packages/_pytest/nodes.py:708: PytestWarning: BlackItem is an Item subclass and should not be a collector, however its bases File are collectors.
  Please split the Collectors and the Item into separate node types.
  Pytest Doc example: https://docs.pytest.org/en/latest/example/nonpython.html
  example pull request on a plugin: https://github.com/asmeurer/pytest-flakes/pull/40/
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
FAILED setup.py::BLACK
FAILED docs/conf.py::BLACK
================================================================= 2 failed, 4 passed, 13 warnings in 2.33s =================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant