UNCLASSIFIED - NO CUI

Skip to content

Resolve "Create custom pylint rule for subprocess decorator"

Kenneth Maguire requested to merge 829-custom-pylint-subprocess-rule into master

Description

Add custom pylint rule for subprocess decorator

Risk

Low - this should only affect our linting

Rollback Plan

Hotfix

Testing

Confirmed the plugin works with the following file in vscode and on the command line.

from ironbank.pipeline.utils.decorators import subprocess_error_handler
import subprocess

def test1():
    subprocess.run(["ls", "-al"], check=True)

@subprocess_error_handler
def test2():
    subprocess.run(["ls", "-al"], check=True)


def test3():
    print('a')

def test5():
    subprocess.run(["ls", "-al"], check=True)

Also tested removing the decorator for cosign.download and pylint reports the error.

Closes #829 (closed)

Merge request reports