Skip to content

Variable shadows a function in python extractor telemetry code #19868

Open
@esteffin

Description

@esteffin

In the telemetry code for the python extractor (ql/python/extractor/semmle/logging.py) class member names shadow the setter function.

For example in:

class Source(StructuredLogObject):
    def __init__(self, id, name, extractorName="python"):
        self.id = id
        self.name = name
        self.extractorName = extractorName

    def extractorName(self, extractorName):
        self.extractorName = extractorName
        return self

The member self.extractorName shadows function def extractorName.

This happens in classes: Source, Visibility and Location.

I suggest to change the setters to with_ParameterName as happens in the class DiagnosticMessage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions