Cannot corectly insert comment for each file type

Kate Cannot corectly insert comment character for the associated file type correspondingly

In editing Python file; having .py extension name, comment language-specific character(s) should be inserted is #
but it get inserted by HTML one, ie.

so is the c++ file; having .cpp extension name

Please help shed a light to solve

what is the file format shown in the lower left corner of kate?

sometimes i’ve needed to change that to get the correct coding and it does not always stick.

none on the lower left corner of kate
you mean on the lower right corner of kate?

PYTHON

sorry, yes lower right.

mine follows the file extension (.py == python, .html == HTML, .cpp == C++) and their comment function is appropriate for each of those without any input from me.

which version are kate are you using and what does kinfo say about your system?