Commit ffaa8eb7 authored by Adrian DC's avatar Adrian DC
Browse files

chore: lint: reduce and resolve some pylint disabled rules

parent 632a0ef8
Loading
Loading
Loading
Loading
Loading
+0 −4
Changes for .gitlab-ci.yml: 0 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -119,11 +119,7 @@ variables:
    - pylint --errors-only ./docs/ ./gitlabci_local/ ./setup.py
    - |
      pylint \
        --disable=bare-except \
        --disable=duplicate-code \
        --disable=line-too-long \
        --disable=missing-docstring \
        --disable=no-self-use \
        --disable=too-few-public-methods \
        --disable=too-many-arguments \
        --disable=too-many-branches \
+2 −1
Changes for docs/preview.py: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -66,7 +66,8 @@ Executor('gitlabci-local -p one two', workdir='../stages/').\
    finish()

# Configurations runner
Executor('gitlabci-local -e VARIABLE_8=\'value8\' -e VARIABLE_12=value12 -p', workdir='../configurations/').\
Executor('gitlabci-local -e VARIABLE_8=\'value8\' -e VARIABLE_12=value12 -p', \
        workdir='../configurations/').\
    read().\
    wait(1).\
    press(Executor.KEY_ENTER).\
+11 −14
Changes for gitlabci_local/cli/main.py: 11 added lines, 14 removed lines.
Original line number Diff line number Diff line
@@ -67,24 +67,22 @@ def main():
    group.add_argument('-A', '--no-after', dest='after', action='store_false',
                       help='Disable after_script executions')
    group.add_argument(
        '-n', dest='network',
        help='Configure the network mode used\nChoices: %s. Default: %s' %
        (', '.join(networks_enum), networks_enum[0]))
        '-n', dest='network', help='Configure the network mode used\n'
        'Choices: %s. Default: %s' % (', '.join(networks_enum), networks_enum[0]))
    group.add_argument('-e', dest='env', action='append',
                       help='Define VARIABLE=value, pass VARIABLE or ENV file')
    group.add_argument(
        '-E', dest='engine',
        help='Force a specific engine (or define %s)\nDefault list: %s' %
        (Bundle.ENV_ENGINE, ','.join(engine_supported())))
        '-E', dest='engine', help='Force a specific engine (or define %s)\n'
        'Default list: %s' % (Bundle.ENV_ENGINE, ','.join(engine_supported())))
    group.add_argument('-H', '--host', dest='host', action='store_true',
                       help='Run all jobs on the host rather than containers')
    group.add_argument(
        '-r', '--real-paths', dest='real_paths', action='store_true',
        help='Mount real folder paths in the container (Linux / macOS only)')
    group.add_argument(
        '-S', '--sockets', dest='sockets', action='store_true', help=
        'Mount engine sockets for nested containers\n(Enabled by default with services: docker:*dind)'
    )
        '-S', '--sockets', dest='sockets', action='store_true',
        help='Mount engine sockets for nested containers\n'
        '(Enabled by default with services: docker:*dind)')
    group.add_argument('-v', dest='volume', action='append',
                       help='Mount VOLUME or HOST:TARGET in containers')
    group.add_argument('-w', dest='workdir',
@@ -114,8 +112,8 @@ def main():
    group.add_argument('-R', '--no-regex', dest='no_regex', action='store_true',
                       help='Disable regex search of names')
    group.add_argument(
        '-t', dest='tags', help='Handle listed tags as manual jobs\nDefault list: %s' %
        (','.join(tags_default)))
        '-t', dest='tags', help='Handle listed tags as manual jobs\n'
        'Default list: %s' % (','.join(tags_default)))

    # Arguments features definitions
    group = parser.add_argument_group('features arguments')
@@ -142,9 +140,8 @@ def main():
    # Arguments positional definitions
    group = parser.add_argument_group('positional arguments')
    group.add_argument(
        'names', nargs='*', help=
        'Names of specific jobs (or stages with --pipeline)\nRegex names is supported unless --no-regex is used'
    )
        'names', nargs='*', help='Names of specific jobs (or stages with --pipeline)\n'
        'Regex names is supported unless --no-regex is used')

    # Arguments parser
    options = parser.parse_args()
+2 −2
Changes for gitlabci_local/engines/docker.py: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ class Docker:
        # Store container
        self.__container = self.__client.containers.get(container_id)

    # Sockets
    # Sockets, pylint: disable=no-self-use
    def __sockets(self, variables, volumes):

        # Variables
@@ -86,7 +86,7 @@ class Docker:
            Outputs.warning('The %s = %s configuration is not supported yet...' %
                            (Docker.ENV_DOCKER_HOST, docker_host))

    # Command exec
    # Command exec, pylint: disable=no-self-use
    def cmd_exec(self):

        # Result
+2 −3
Changes for gitlabci_local/jobs/outputs.py: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -13,9 +13,8 @@ class Outputs:

        # Debugging informations
        print(' ')
        print(
            '  %s‣ INFORMATION: %sUse \'%s%s %s %s%s\' commands for debugging. Interrupt with Ctrl+C...%s'
            % (
        print('  %s‣ INFORMATION: %sUse \'%s%s %s %s%s\' commands for debugging.'
              ' Interrupt with Ctrl+C...%s' % (
                  Colors.YELLOW,
                  Colors.BOLD,
                  Colors.CYAN,
Loading