Skip to content

acknowledge-existing-violations omits colon after noqa, which ignores all errors, not specific errors #125

@bkeryan

Description

@bkeryan

ni-python-styleguide acknowledge-existing-violations adds noqa comments without a colon, like this one:

    def GetMetadata(  # noqa N802: function name 'GetMetadata' should be lowercase (auto-generated noqa)
        self, request: v1_measurement_service_pb2.GetMetadataRequest, context: grpc.ServicerContext
    ) -> v1_measurement_service_pb2.GetMetadataResponse:

https://www.alpharithms.com/noqa-python-501210/ says

Multiple codes can be given, separated by a comma. The noqa token is case insensitive, the colon before the list of codes is required otherwise the part after noqa is ignored

I noticed this because I added type annotations and ni-python-styleguide fix did not wrap the extremely long line.

Related: ni/measurement-plugin-python#250

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