Problem statement
Bug description
Have any list of errors:
On pylint 1.7 w/ python3.6 - I am able to use this as my message template
$ pylint test.py --msg-template='{{ "Category": "{category}" }}'
No config file found, using default configuration
************* Module [redacted].test
{ "Category": "convention" }
{ "Category": "error" }
{ "Category": "error" }
{ "Category": "convention" }
{ "Category": "convention" }
{ "Category": "convention" }
{ "Category": "error" }However, on Python3.9 with Pylint 2.12.2, I get the following:
$ pylint test.py --msg-template='{{ "Category": "{category}" }}'
[redacted]/site-packages/pylint/reporters/text.py:206: UserWarning: Don't recognize the argument '{ "Category"' in the --msg-template. Are you sure it is supported on the current version of pylint?
warnings.warn(
************* Module [redacted].test
" }
" }
" }
" }
" }
" }Is this intentional or a bug?
Configuration
_No response_
Command used
pylint test.py --msg-template='{{ "Category": "{category}" }}'Pylint output
[redacted]/site-packages/pylint/reporters/text.py:206: UserWarning: Don't recognize the argument '{ "Category"' in the --msg-template. Are you sure it is supported on the current version of pylint?
warnings.warn(
************* Module [redacted].test
" }
" }
" }
" }
" }
" }Expected behavior
Expect the dictionary to print out with "Category" as the key.
Pylint version
Affected Version:
pylint 2.12.2
astroid 2.9.2
Python 3.9.9+ (heads/3.9-dirty:a2295a4, Dec 21 2021, 22:32:52)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
Previously working version:
No config file found, using default configuration
pylint 1.7.4,
astroid 1.6.6
Python 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]OS / Environment
_No response_
Additional dependencies
_No response_
The environment starts at commit
e90702074e68 (pylint-dev/pylint 2.15), dependencies installed and tests runnable from the first minute. You are graded by hidden tests taken from the fix that was actually merged upstream.