Skip to content

fix: amend config_generator method definition in ConfigGenerator class #3941

@michaelwknott

Description

@michaelwknott

Currently, the config_generator method of the ConfigGenerator class is defined without 'self' as a parameter and is not decorated with a static or class method decorator. I'm wondering if this could potentially lead to issues if an instance of the ConfigGenerator class is instantiated or the method requries access to class level attributes in the future?

https://github.com/intel/cve-bin-tool/blob/46deb12d8b1839b6d7375bcc3e859cd7977d04b5/cve_bin_tool/config_generator.py#L15C1-L30C12

As config_generator is being called on the ConfigGenerator class (in cli.py), might it be better suited as a static method or a standalone function?

https://github.com/intel/cve-bin-tool/blob/46deb12d8b1839b6d7375bcc3e859cd7977d04b5/cve_bin_tool/cli.py#L662C13-L662C81

If I've missing something obvious please let me know, but I'd be happy to open a PR to correct this if useful?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions