Completed
Pull Request — master (#40)
by Oleg
01:53
created

SDoc.get_default_commands()   A

Complexity

Conditions 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
1
"""
2
SDoc
3
4
Copyright 2016 Set Based IT Consultancy
5
6
Licence MIT
7
"""
8
# ----------------------------------------------------------------------------------------------------------------------
9
from cleo import Application
0 ignored issues
show
Configuration introduced by
The import cleo could not be resolved.

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.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

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.

Loading history...
10
from sdoc.command.SDoc1Command import SDoc1Command
11
from sdoc.command.SDoc2Command import SDoc2Command
12
from sdoc.command.GenerateCommand import GenerateCommand
13
14
15
# ----------------------------------------------------------------------------------------------------------------------
16
class SDoc(Application):
0 ignored issues
show
Coding Style introduced by
This class has no __init__ method.
Loading history...
17
    """
18
    The SDoc application.
19
    """
20
21
    # ------------------------------------------------------------------------------------------------------------------
22
    def get_default_commands(self):
0 ignored issues
show
Coding Style introduced by
This method should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
23
        commands = Application.get_default_commands(self)
24
25
        self.add(GenerateCommand())
0 ignored issues
show
Bug introduced by
The Instance of SDoc does not seem to have a member named add.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
26
        self.add(SDoc1Command())
0 ignored issues
show
Bug introduced by
The Instance of SDoc does not seem to have a member named add.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
27
        self.add(SDoc2Command())
0 ignored issues
show
Bug introduced by
The Instance of SDoc does not seem to have a member named add.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
28
29
        return commands
30
31
# ----------------------------------------------------------------------------------------------------------------------
32