Advertisement
Guest User

python-lsp-ruff manjaro

a guest
May 31st, 2023
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.94 KB | Software | 0 0
  1. Preparing...
  2. Synchronizing package databases...
  3. Refreshing AUR...
  4. Cloning python-lsp-ruff build files...
  5. Generating python-lsp-ruff information...
  6. Checking python-lsp-ruff dependencies...
  7. Warning: manjaro-hello: local (0.7.0-6) is newer than extra (0.7.0-5)
  8. Resolving dependencies...
  9. Checking inter-conflicts...
  10.  
  11. Building python-lsp-ruff...
  12. ==> Making package: python-lsp-ruff 1.5.1-1 (Wednesday 31 May 2023 09:10:16 PM)
  13. ==> Checking runtime dependencies...
  14. ==> Checking buildtime dependencies...
  15. ==> Retrieving sources...
  16. -> Downloading python-lsp-ruff-1.5.1.tar.gz...
  17. % Total % Received % Xferd Average Speed Time Time Time Current
  18. Dload Upload Total Spent Left Speed
  19.  
  20. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  21. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  22. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  23.  
  24. 100 10751 0 10751 0 0 12613 0 --:--:-- --:--:-- --:--:-- 12613
  25. ==> Validating source files with sha256sums...
  26. python-lsp-ruff-1.5.1.tar.gz ... Passed
  27. ==> Removing existing $srcdir/ directory...
  28. ==> Extracting sources...
  29. -> Extracting python-lsp-ruff-1.5.1.tar.gz with bsdtar
  30. ==> Removing existing $pkgdir/ directory...
  31. ==> Starting build()...
  32. * Getting build dependencies for wheel...
  33. validate_pyproject.api.load_builtin_plugin defines `tool.distutils` schema
  34. validate_pyproject.api.load_builtin_plugin defines `tool.setuptools` schema
  35. running egg_info
  36. creating python_lsp_ruff.egg-info
  37. writing python_lsp_ruff.egg-info/PKG-INFO
  38. writing dependency_links to python_lsp_ruff.egg-info/dependency_links.txt
  39. writing entry points to python_lsp_ruff.egg-info/entry_points.txt
  40. writing requirements to python_lsp_ruff.egg-info/requires.txt
  41. writing top-level names to python_lsp_ruff.egg-info/top_level.txt
  42. writing manifest file 'python_lsp_ruff.egg-info/SOURCES.txt'
  43. reading manifest file 'python_lsp_ruff.egg-info/SOURCES.txt'
  44. adding license file 'LICENSE'
  45. writing manifest file 'python_lsp_ruff.egg-info/SOURCES.txt'
  46. * Building wheel...
  47. validate_pyproject.api.load_builtin_plugin defines `tool.distutils` schema
  48. validate_pyproject.api.load_builtin_plugin defines `tool.setuptools` schema
  49. running bdist_wheel
  50. running build
  51. running build_py
  52. creating build
  53. creating build/lib
  54. creating build/lib/pylsp_ruff
  55. copying pylsp_ruff/settings.py -> build/lib/pylsp_ruff
  56. copying pylsp_ruff/plugin.py -> build/lib/pylsp_ruff
  57. copying pylsp_ruff/ruff.py -> build/lib/pylsp_ruff
  58. copying pylsp_ruff/__init__.py -> build/lib/pylsp_ruff
  59. running egg_info
  60. writing python_lsp_ruff.egg-info/PKG-INFO
  61. writing dependency_links to python_lsp_ruff.egg-info/dependency_links.txt
  62. writing entry points to python_lsp_ruff.egg-info/entry_points.txt
  63. writing requirements to python_lsp_ruff.egg-info/requires.txt
  64. writing top-level names to python_lsp_ruff.egg-info/top_level.txt
  65. reading manifest file 'python_lsp_ruff.egg-info/SOURCES.txt'
  66. adding license file 'LICENSE'
  67. writing manifest file 'python_lsp_ruff.egg-info/SOURCES.txt'
  68. installing to build/bdist.linux-x86_64/wheel
  69. running install
  70. running install_lib
  71. creating build/bdist.linux-x86_64
  72. creating build/bdist.linux-x86_64/wheel
  73. creating build/bdist.linux-x86_64/wheel/pylsp_ruff
  74. copying build/lib/pylsp_ruff/settings.py -> build/bdist.linux-x86_64/wheel/pylsp_ruff
  75. copying build/lib/pylsp_ruff/plugin.py -> build/bdist.linux-x86_64/wheel/pylsp_ruff
  76. copying build/lib/pylsp_ruff/ruff.py -> build/bdist.linux-x86_64/wheel/pylsp_ruff
  77. copying build/lib/pylsp_ruff/__init__.py -> build/bdist.linux-x86_64/wheel/pylsp_ruff
  78. running install_egg_info
  79. Copying python_lsp_ruff.egg-info to build/bdist.linux-x86_64/wheel/python_lsp_ruff-1.5.1-py3.10.egg-info
  80. running install_scripts
  81. creating build/bdist.linux-x86_64/wheel/python_lsp_ruff-1.5.1.dist-info/WHEEL
  82. 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
  83. adding 'pylsp_ruff/__init__.py'
  84. adding 'pylsp_ruff/plugin.py'
  85. adding 'pylsp_ruff/ruff.py'
  86. adding 'pylsp_ruff/settings.py'
  87. adding 'python_lsp_ruff-1.5.1.dist-info/LICENSE'
  88. adding 'python_lsp_ruff-1.5.1.dist-info/METADATA'
  89. adding 'python_lsp_ruff-1.5.1.dist-info/WHEEL'
  90. adding 'python_lsp_ruff-1.5.1.dist-info/entry_points.txt'
  91. adding 'python_lsp_ruff-1.5.1.dist-info/top_level.txt'
  92. adding 'python_lsp_ruff-1.5.1.dist-info/RECORD'
  93. removing build/bdist.linux-x86_64/wheel
  94. Successfully built python_lsp_ruff-1.5.1-py3-none-any.whl
  95. ==> Starting check()...
  96. ============================= test session starts ==============================
  97. platform linux -- Python 3.10.10, pytest-7.3.1, pluggy-1.0.0
  98. rootdir: /var/tmp/pamac-build-h/python-lsp-ruff/src/python-lsp-ruff-1.5.1
  99. configfile: pyproject.toml
  100. collected 10 items
  101.  
  102. tests/test_code_actions.py FF... [ 50%]
  103. tests/test_ruff_lint.py ..... [100%]
  104.  
  105. =================================== FAILURES ===================================
  106. ____________________________ test_ruff_code_actions ____________________________
  107.  
  108. workspace = <pylsp.workspace.Workspace object at 0x7fcf3c5db490>
  109.  
  110. def test_ruff_code_actions(workspace):
  111. _, doc = temp_document(codeaction_str, workspace)
  112.  
  113. workspace._config.update({"plugins": {"ruff": {"select": ["F"]}}})
  114. diags = ruff_lint.pylsp_lint(workspace, doc)
  115. range_ = cattrs.unstructure(
  116. Range(start=Position(line=0, character=0), end=Position(line=0, character=0))
  117. )
  118. > actions = ruff_lint.pylsp_code_actions(
  119. workspace._config, workspace, doc, range=range_, context={"diagnostics": diags}
  120. )
  121.  
  122. tests/test_code_actions.py:78:
  123. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  124. pylsp_ruff/plugin.py:234: in pylsp_code_actions
  125. create_fix_code_action(
  126. pylsp_ruff/plugin.py:273: in create_fix_code_action
  127. text_edits = create_text_edits(fix)
  128. pylsp_ruff/plugin.py:361: in create_text_edits
  129. start=Position(
  130. <attrs generated init lsprotocol.types.Position>:7: in __init__
  131. __attr_validator_character(self, __attr_character, self.character)
  132. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  133.  
  134. instance = 1:-1
  135. 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')
  136. value = -1
  137.  
  138. def uinteger_validator(
  139. instance: Any,
  140. attribute: "attrs.Attribute[int]",
  141. value: Any,
  142. ) -> bool:
  143. """Validates that unsigned integer value belongs in the range expected by
  144. LSP."""
  145. if not isinstance(value, int) or not (
  146. UINTEGER_MIN_VALUE <= value <= UINTEGER_MAX_VALUE
  147. ):
  148. name = attribute.name if hasattr(attribute, "name") else str(attribute)
  149. > raise ValueError(
  150. f"{instance.__class__.__qualname__}.{name} should be in range [{UINTEGER_MIN_VALUE}:{UINTEGER_MAX_VALUE}], but was {value}."
  151. )
  152. E ValueError: Position.character should be in range [0:2147483647], but was -1.
  153.  
  154. /usr/lib/python3.10/site-packages/lsprotocol/validators.py:45: ValueError
  155. ______________________________ test_import_action ______________________________
  156.  
  157. workspace = <pylsp.workspace.Workspace object at 0x7fcf3b807a00>
  158.  
  159. def test_import_action(workspace):
  160. workspace._config.update(
  161. {
  162. "plugins": {
  163. "ruff": {
  164. "extendSelect": ["I"],
  165. "extendIgnore": ["F"],
  166. }
  167. }
  168. }
  169. )
  170. _, doc = temp_document(import_str, workspace)
  171.  
  172. diags = ruff_lint.pylsp_lint(workspace, doc)
  173. range_ = cattrs.unstructure(
  174. Range(start=Position(line=0, character=0), end=Position(line=0, character=0))
  175. )
  176. > actions = ruff_lint.pylsp_code_actions(
  177. workspace._config, workspace, doc, range=range_, context={"diagnostics": diags}
  178. )
  179.  
  180. tests/test_code_actions.py:103:
  181. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  182. pylsp_ruff/plugin.py:227: in pylsp_code_actions
  183. create_organize_imports_code_action(
  184. pylsp_ruff/plugin.py:326: in create_organize_imports_code_action
  185. text_edits = create_text_edits(fix)
  186. pylsp_ruff/plugin.py:361: in create_text_edits
  187. start=Position(
  188. <attrs generated init lsprotocol.types.Position>:7: in __init__
  189. __attr_validator_character(self, __attr_character, self.character)
  190. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  191.  
  192. instance = 1:-1
  193. 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')
  194. value = -1
  195.  
  196. def uinteger_validator(
  197. instance: Any,
  198. attribute: "attrs.Attribute[int]",
  199. value: Any,
  200. ) -> bool:
  201. """Validates that unsigned integer value belongs in the range expected by
  202. LSP."""
  203. if not isinstance(value, int) or not (
  204. UINTEGER_MIN_VALUE <= value <= UINTEGER_MAX_VALUE
  205. ):
  206. name = attribute.name if hasattr(attribute, "name") else str(attribute)
  207. > raise ValueError(
  208. f"{instance.__class__.__qualname__}.{name} should be in range [{UINTEGER_MIN_VALUE}:{UINTEGER_MAX_VALUE}], but was {value}."
  209. )
  210. E ValueError: Position.character should be in range [0:2147483647], but was -1.
  211.  
  212. /usr/lib/python3.10/site-packages/lsprotocol/validators.py:45: ValueError
  213. =============================== warnings summary ===============================
  214. ../../../../../../usr/lib/python3.10/site-packages/pkg_resources/__init__.py:121
  215. /usr/lib/python3.10/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
  216. warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
  217.  
  218. tests/test_code_actions.py::test_ruff_code_actions
  219. /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+
  220. from lib2to3.pgen2 import tokenize
  221.  
  222. -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
  223. =========================== short test summary info ============================
  224. FAILED tests/test_code_actions.py::test_ruff_code_actions - ValueError: Posit...
  225. FAILED tests/test_code_actions.py::test_import_action - ValueError: Position....
  226. =================== 2 failed, 8 passed, 2 warnings in 2.66s ====================
  227. ==> ERROR: A failure occurred in check().
  228. Aborting...
  229.  
  230.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement