Skip to content

Python CodeQL reports parse error due to a trailing comma used in match patterns #14863

@sergei-maertens

Description

@sergei-maertens

The exact warning is:

Could not process some files due to syntax errors

A parse error occurred while processing /home/runner/work/open-forms/open-forms/src/openforms/formio/validation.py, and as a result this file could not be analyzed. Check the syntax of the file using the python -m py_compile command and correct any invalid syntax.

The offending file: https://github.com/open-formulieren/open-forms/blob/b237275f77153c3541a920a09ccdc2570c46248e/src/openforms/formio/validation.py#L87

Code QL does not seem to understand the Python 3.10 pattern matching correctly yet. The file runs fine and is actually used in production (+ has 100% test coverage).

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