Conditions | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | 3 | import contextlib |
|
14 | 3 | @contextlib.contextmanager |
|
15 | 3 | def work_in(dirname=None): |
|
16 | """ |
||
17 | Context manager version of os.chdir. When exited, returns to the working |
||
18 | directory prior to entering. |
||
19 | """ |
||
20 | 3 | curdir = os.getcwd() |
|
21 | 3 | try: |
|
22 | 3 | if dirname is not None: |
|
23 | 3 | os.chdir(dirname) |
|
24 | 3 | yield |
|
25 | finally: |
||
26 | 3 | os.chdir(curdir) |
|
27 | |||
85 | main.add_command(status) |
This can be caused by one of the following:
1. Missing Dependencies
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
2. Missing __init__.py files
This error could also result from missing
__init__.py
files in your module folders. Make sure that you place one file in each sub-folder.