python-ls icon indicating copy to clipboard operation
python-ls copied to clipboard

Exceptions on search term without depth, and when processing re module

Open skeledrew opened this issue 7 years ago • 0 comments

As shown in the following examples:

>>> ls(os, 'blah')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/skeledrew/.pyenv/versions/3.6.1/envs/general/lib/python3.6/site-packages/python_ls/_ls.py", line 32, in ls
    dunder=dunder, under=under):
  File "/home/skeledrew/.pyenv/versions/3.6.1/envs/general/lib/python3.6/site-packages/python_ls/_ls.py", line 53, in iter_ls
    if current_depth <= depth:
TypeError: '<=' not supported between instances of 'int' and 'NoneType'
'<=' not supported between instances of 'int' and 'NoneType'

and

>>> ls(re)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/skeledrew/.pyenv/versions/3.6.1/envs/general/lib/python3.6/site-packages/python_ls/_ls.py", line 37, in ls
    size = len(value)
TypeError: object of type 'RegexFlag' has no len()
object of type 'RegexFlag' has no len()

skeledrew avatar Aug 21 '18 19:08 skeledrew