| Conditions | 4 |
| Total Lines | 32 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 4.407 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | |||
| 9 | 3 | def stage(draft): |
|
| 10 | 3 | repository, bumpversion_part, release_type, proposed_version = status() |
|
| 11 | |||
| 12 | 3 | if not repository.changes_since_last_version: |
|
| 13 | error("There aren't any changes to release!") |
||
| 14 | return |
||
| 15 | |||
| 16 | 3 | info('Staging [{}] release for version {}'.format( |
|
| 17 | release_type, |
||
| 18 | proposed_version |
||
| 19 | )) |
||
| 20 | |||
| 21 | 3 | bumpversion_arguments = ( |
|
| 22 | BumpVersion.DRAFT_OPTIONS if draft |
||
| 23 | else BumpVersion.STAGE_OPTIONS |
||
| 24 | ) |
||
| 25 | 3 | bumpversion_arguments += [bumpversion_part] |
|
| 26 | |||
| 27 | 3 | info('Running: bumpversion {}'.format( |
|
| 28 | ' '.join(bumpversion_arguments) |
||
| 29 | )) |
||
| 30 | |||
| 31 | 3 | try: |
|
| 32 | 3 | bumpversion.main(bumpversion_arguments) |
|
| 33 | except bumpversion.WorkingDirectoryIsDirtyException as err: |
||
| 34 | error(err) |
||
| 35 | raise |
||
| 36 | 3 | staged_files = [ |
|
| 37 | |||
| 38 | ] |
||
| 39 | 3 | staged_release = None |
|
| 40 | return staged_release |
||
| 41 |
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__.pyfiles in your module folders. Make sure that you place one file in each sub-folder.