Reference
Define all the orchestration functionality required by the program to work.
Classes and functions that connect the different domain model objects with the adapters and handlers to achieve the program's purpose.
fix_code(original_source_code, config=None, keep_unused_imports=False)
¶
Fix python source code to correct import statements.
It corrects these errors
- Add missed import statements.
- Remove unused import statements.
- Move import statements to the top.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
original_source_code | str | Source code to be corrected. | required |
keep_unused_imports | bool | If true, unused imports are retained. | False |
Returns:
Type | Description |
---|---|
str | Corrected source code. |
Source code in autoimport/services.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
fix_files(files, config=None, keep_unused_imports=False)
¶
Fix the python source code of a list of files.
If the input is taken from stdin, it will output the value to stdout.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
files | Tuple[TextIOWrapper, ...] | List of files to fix. | required |
Returns:
Type | Description |
---|---|
Optional[str] | Fixed code retrieved from stdin or None. |
Source code in autoimport/services.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
Define the different ways to expose the program functionality.
Functions
load_logger(verbose=False)
¶
Configure the Logging logger.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
verbose | bool | Set the logging level to Debug. | False |
Source code in autoimport/entrypoints/__init__.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
Utilities to retrieve the information of the program version.
version_info()
¶
Display the version of the program, python and the platform.
Source code in autoimport/version.py
12 13 14 15 16 17 18 19 20 21 |
|