Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Getting unresolved-import on random lines (without import statements) #2035

@bthorsted

Description

@bthorsted

I have recently started experiencing false positives for "unresolved import" on random lines (sometimes even spanning two lines) for nonexisting imports.

Environment data

  • Language Server version: 0.5.50.0
  • OS and version: Ubuntu 16.04
  • Python version: Python 3.8.2 64-bit

Expected behaviour

The following code should be free of any errors:

1    def scan_run(self):
2
3        '''The high-level management of the scan procedures
4        onwards from preparation. Manages round_run()'''
5        # pylint: disable=protected-access,import-outside-toplevel
6        import yaml
7        import pickle
8        from os.path import isfile
9        from tqdm import tqdm
10
11       from .scan_prepare import scan_prepare
12       self = scan_prepare(self)
13
14       # initiate the progress bar
15       if self.allow_resume:
16           self.pbar = tqdm(total=max(self.param_object.param_index)+1,
17                            disable=self.disable_progress_bar,
18                            initial=self.param_object.param_index[0])
19       else:
20           self.pbar = tqdm(total=len(self.param_object.param_index),
21                            disable=self.disable_progress_bar)

Actual behaviour

The following erros are listed:
unresolved-code
unresolved-import

None of the imports mentioned actually exist and neither does the import statements. Not in this file or any other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions