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

Unpin numpy #7

Merged
merged 3 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
'yapf': ['yapf'],
'test': ['versioneer',
'pylint>=2.5.0' if sys.version_info.major >= 3 else 'pylint',
'pytest', 'mock', 'pytest-cov', 'coverage', 'numpy<1.20', 'pandas',
'pytest', 'mock', 'pytest-cov', 'coverage', 'numpy', 'pandas',
'matplotlib', 'pyqt5;python_version>="3"', 'flaky'],
},

Expand Down
6 changes: 3 additions & 3 deletions test/plugins/test_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ def test_completion_with_class_objects(config, workspace):


def test_snippet_parsing(config, workspace):
doc = 'import numpy as np\nnp.logical_and'
completion_position = {'line': 1, 'character': 14}
doc = 'divmod'
completion_position = {'line': 0, 'character': 6}
doc = Document(DOC_URI, workspace, doc)
config.capabilities['textDocument'] = {
'completion': {'completionItem': {'snippetSupport': True}}}
config.update({'plugins': {'jedi_completion': {'include_params': True}}})
completions = pyls_jedi_completions(config, doc, completion_position)
out = 'logical_and(${1:x1}, ${2:x2})$0'
out = 'divmod(${1:a}, ${2:b})$0'
assert completions[0]['insertText'] == out


Expand Down
10 changes: 7 additions & 3 deletions test/plugins/test_hover.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ def test_numpy_hover(workspace):
contents = 'NumPy\n=====\n\nProvides\n'
assert contents in pyls_hover(doc, numpy_hov_position_3)['contents'][0]

contents = 'Trigonometric sine, element-wise.\n\n'
assert contents in pyls_hover(
doc, numpy_sin_hov_position)['contents'][0]
# https://github.com/davidhalter/jedi/issues/1746
import numpy as np

if np.lib.NumpyVersion(np.__version__) < '1.20.0':
contents = 'Trigonometric sine, element-wise.\n\n'
assert contents in pyls_hover(
doc, numpy_sin_hov_position)['contents'][0]


def test_hover(workspace):
Expand Down