I am having problems disabling the pylint `syntax-error` for compatibility code. Basically, I have a compatibility sub-package  that tries importing different variants of code until it does not hit SyntaxError. There are other projects where I do the same. I have found a bug report on a similar issue  but it was closed.
Pylint is having a hard time with this approach. When I run the check with python3, all python2-only code produces syntax-error. It is not possible to disable this error with either `# pylint: skip-file` or `# pylint: disable=syntax-error` at the start of the file. I don't want to ignore compatibility code per se, as it tends to collect quite a lot of code smell. Since it is a severe error requiring action under most circumstances, I don't want a mental "just ignore syntax-error" to be a required for reading reports.
Is there a way to get pylint to play nice with compatibility code? Can I refactor my code to play nicer with pylint?
 disable=syntax-error doesn't work #986 https://github.com/PyCQA/pylint/issues/986