Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Preparing...
- Synchronizing package databases...
- Refreshing AUR...
- Cloning python-lsp-ruff build files...
- Generating python-lsp-ruff information...
- Checking python-lsp-ruff dependencies...
- Warning: manjaro-hello: local (0.7.0-6) is newer than extra (0.7.0-5)
- Resolving dependencies...
- Checking inter-conflicts...
- Building python-lsp-ruff...
- ==> Making package: python-lsp-ruff 1.5.1-1 (Wednesday 31 May 2023 09:10:16 PM)
- ==> Checking runtime dependencies...
- ==> Checking buildtime dependencies...
- ==> Retrieving sources...
- -> Downloading python-lsp-ruff-1.5.1.tar.gz...
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
- 100 10751 0 10751 0 0 12613 0 --:--:-- --:--:-- --:--:-- 12613
- ==> Validating source files with sha256sums...
- python-lsp-ruff-1.5.1.tar.gz ... Passed
- ==> Removing existing $srcdir/ directory...
- ==> Extracting sources...
- -> Extracting python-lsp-ruff-1.5.1.tar.gz with bsdtar
- ==> Removing existing $pkgdir/ directory...
- ==> Starting build()...
- * Getting build dependencies for wheel...
- validate_pyproject.api.load_builtin_plugin defines `tool.distutils` schema
- validate_pyproject.api.load_builtin_plugin defines `tool.setuptools` schema
- running egg_info
- creating python_lsp_ruff.egg-info
- writing python_lsp_ruff.egg-info/PKG-INFO
- writing dependency_links to python_lsp_ruff.egg-info/dependency_links.txt
- writing entry points to python_lsp_ruff.egg-info/entry_points.txt
- writing requirements to python_lsp_ruff.egg-info/requires.txt
- writing top-level names to python_lsp_ruff.egg-info/top_level.txt
- writing manifest file 'python_lsp_ruff.egg-info/SOURCES.txt'
- reading manifest file 'python_lsp_ruff.egg-info/SOURCES.txt'
- adding license file 'LICENSE'
- writing manifest file 'python_lsp_ruff.egg-info/SOURCES.txt'
- * Building wheel...
- validate_pyproject.api.load_builtin_plugin defines `tool.distutils` schema
- validate_pyproject.api.load_builtin_plugin defines `tool.setuptools` schema
- running bdist_wheel
- running build
- running build_py
- creating build
- creating build/lib
- creating build/lib/pylsp_ruff
- copying pylsp_ruff/settings.py -> build/lib/pylsp_ruff
- copying pylsp_ruff/plugin.py -> build/lib/pylsp_ruff
- copying pylsp_ruff/ruff.py -> build/lib/pylsp_ruff
- copying pylsp_ruff/__init__.py -> build/lib/pylsp_ruff
- running egg_info
- writing python_lsp_ruff.egg-info/PKG-INFO
- writing dependency_links to python_lsp_ruff.egg-info/dependency_links.txt
- writing entry points to python_lsp_ruff.egg-info/entry_points.txt
- writing requirements to python_lsp_ruff.egg-info/requires.txt
- writing top-level names to python_lsp_ruff.egg-info/top_level.txt
- reading manifest file 'python_lsp_ruff.egg-info/SOURCES.txt'
- adding license file 'LICENSE'
- writing manifest file 'python_lsp_ruff.egg-info/SOURCES.txt'
- installing to build/bdist.linux-x86_64/wheel
- running install
- running install_lib
- creating build/bdist.linux-x86_64
- creating build/bdist.linux-x86_64/wheel
- creating build/bdist.linux-x86_64/wheel/pylsp_ruff
- copying build/lib/pylsp_ruff/settings.py -> build/bdist.linux-x86_64/wheel/pylsp_ruff
- copying build/lib/pylsp_ruff/plugin.py -> build/bdist.linux-x86_64/wheel/pylsp_ruff
- copying build/lib/pylsp_ruff/ruff.py -> build/bdist.linux-x86_64/wheel/pylsp_ruff
- copying build/lib/pylsp_ruff/__init__.py -> build/bdist.linux-x86_64/wheel/pylsp_ruff
- running install_egg_info
- Copying python_lsp_ruff.egg-info to build/bdist.linux-x86_64/wheel/python_lsp_ruff-1.5.1-py3.10.egg-info
- running install_scripts
- creating build/bdist.linux-x86_64/wheel/python_lsp_ruff-1.5.1.dist-info/WHEEL
- creating '/var/tmp/pamac-build-h/python-lsp-ruff/src/python-lsp-ruff-1.5.1/dist/.tmp-w00za52r/python_lsp_ruff-1.5.1-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
- adding 'pylsp_ruff/__init__.py'
- adding 'pylsp_ruff/plugin.py'
- adding 'pylsp_ruff/ruff.py'
- adding 'pylsp_ruff/settings.py'
- adding 'python_lsp_ruff-1.5.1.dist-info/LICENSE'
- adding 'python_lsp_ruff-1.5.1.dist-info/METADATA'
- adding 'python_lsp_ruff-1.5.1.dist-info/WHEEL'
- adding 'python_lsp_ruff-1.5.1.dist-info/entry_points.txt'
- adding 'python_lsp_ruff-1.5.1.dist-info/top_level.txt'
- adding 'python_lsp_ruff-1.5.1.dist-info/RECORD'
- removing build/bdist.linux-x86_64/wheel
- Successfully built python_lsp_ruff-1.5.1-py3-none-any.whl
- ==> Starting check()...
- ============================= test session starts ==============================
- platform linux -- Python 3.10.10, pytest-7.3.1, pluggy-1.0.0
- rootdir: /var/tmp/pamac-build-h/python-lsp-ruff/src/python-lsp-ruff-1.5.1
- configfile: pyproject.toml
- collected 10 items
- tests/test_code_actions.py FF... [ 50%]
- tests/test_ruff_lint.py ..... [100%]
- =================================== FAILURES ===================================
- ____________________________ test_ruff_code_actions ____________________________
- workspace = <pylsp.workspace.Workspace object at 0x7fcf3c5db490>
- def test_ruff_code_actions(workspace):
- _, doc = temp_document(codeaction_str, workspace)
- workspace._config.update({"plugins": {"ruff": {"select": ["F"]}}})
- diags = ruff_lint.pylsp_lint(workspace, doc)
- range_ = cattrs.unstructure(
- Range(start=Position(line=0, character=0), end=Position(line=0, character=0))
- )
- > actions = ruff_lint.pylsp_code_actions(
- workspace._config, workspace, doc, range=range_, context={"diagnostics": diags}
- )
- tests/test_code_actions.py:78:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pylsp_ruff/plugin.py:234: in pylsp_code_actions
- create_fix_code_action(
- pylsp_ruff/plugin.py:273: in create_fix_code_action
- text_edits = create_text_edits(fix)
- pylsp_ruff/plugin.py:361: in create_text_edits
- start=Position(
- <attrs generated init lsprotocol.types.Position>:7: in __init__
- __attr_validator_character(self, __attr_character, self.character)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- instance = 1:-1
- attribute = Attribute(name='character', default=NOTHING, validator=<function uinteger_validator at 0x7fcf3d46ee60>, repr=True, eq=...ppingproxy({}), type=<class 'int'>, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='character')
- value = -1
- def uinteger_validator(
- instance: Any,
- attribute: "attrs.Attribute[int]",
- value: Any,
- ) -> bool:
- """Validates that unsigned integer value belongs in the range expected by
- LSP."""
- if not isinstance(value, int) or not (
- UINTEGER_MIN_VALUE <= value <= UINTEGER_MAX_VALUE
- ):
- name = attribute.name if hasattr(attribute, "name") else str(attribute)
- > raise ValueError(
- f"{instance.__class__.__qualname__}.{name} should be in range [{UINTEGER_MIN_VALUE}:{UINTEGER_MAX_VALUE}], but was {value}."
- )
- E ValueError: Position.character should be in range [0:2147483647], but was -1.
- /usr/lib/python3.10/site-packages/lsprotocol/validators.py:45: ValueError
- ______________________________ test_import_action ______________________________
- workspace = <pylsp.workspace.Workspace object at 0x7fcf3b807a00>
- def test_import_action(workspace):
- workspace._config.update(
- {
- "plugins": {
- "ruff": {
- "extendSelect": ["I"],
- "extendIgnore": ["F"],
- }
- }
- }
- )
- _, doc = temp_document(import_str, workspace)
- diags = ruff_lint.pylsp_lint(workspace, doc)
- range_ = cattrs.unstructure(
- Range(start=Position(line=0, character=0), end=Position(line=0, character=0))
- )
- > actions = ruff_lint.pylsp_code_actions(
- workspace._config, workspace, doc, range=range_, context={"diagnostics": diags}
- )
- tests/test_code_actions.py:103:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- pylsp_ruff/plugin.py:227: in pylsp_code_actions
- create_organize_imports_code_action(
- pylsp_ruff/plugin.py:326: in create_organize_imports_code_action
- text_edits = create_text_edits(fix)
- pylsp_ruff/plugin.py:361: in create_text_edits
- start=Position(
- <attrs generated init lsprotocol.types.Position>:7: in __init__
- __attr_validator_character(self, __attr_character, self.character)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- instance = 1:-1
- attribute = Attribute(name='character', default=NOTHING, validator=<function uinteger_validator at 0x7fcf3d46ee60>, repr=True, eq=...ppingproxy({}), type=<class 'int'>, converter=None, kw_only=False, inherited=False, on_setattr=None, alias='character')
- value = -1
- def uinteger_validator(
- instance: Any,
- attribute: "attrs.Attribute[int]",
- value: Any,
- ) -> bool:
- """Validates that unsigned integer value belongs in the range expected by
- LSP."""
- if not isinstance(value, int) or not (
- UINTEGER_MIN_VALUE <= value <= UINTEGER_MAX_VALUE
- ):
- name = attribute.name if hasattr(attribute, "name") else str(attribute)
- > raise ValueError(
- f"{instance.__class__.__qualname__}.{name} should be in range [{UINTEGER_MIN_VALUE}:{UINTEGER_MAX_VALUE}], but was {value}."
- )
- E ValueError: Position.character should be in range [0:2147483647], but was -1.
- /usr/lib/python3.10/site-packages/lsprotocol/validators.py:45: ValueError
- =============================== warnings summary ===============================
- ../../../../../../usr/lib/python3.10/site-packages/pkg_resources/__init__.py:121
- /usr/lib/python3.10/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
- warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
- tests/test_code_actions.py::test_ruff_code_actions
- /usr/lib/python3.10/site-packages/yapf/yapflib/errors.py:16: PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
- from lib2to3.pgen2 import tokenize
- -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
- =========================== short test summary info ============================
- FAILED tests/test_code_actions.py::test_ruff_code_actions - ValueError: Posit...
- FAILED tests/test_code_actions.py::test_import_action - ValueError: Position....
- =================== 2 failed, 8 passed, 2 warnings in 2.66s ====================
- ==> ERROR: A failure occurred in check().
- Aborting...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement