4

I'm looking for something like

[BASIC]
good-names=X,
           y

as in pylintrc, but I'd like to limit these names to be good only within a single python file.

I thought about message control like #pylint: disable=invalid-names on top of the file, but that is too broad. Ideally, I'd like to only allow these two invalid names X and y to be considered good within a single file. Is that possible with pylint?

zyxue
  • 7,904
  • 5
  • 48
  • 74

1 Answers1

0

Only way I have been able to achieve this effect has been to disable and then immediately enable again immediately afterwards. It's not what you wanted but at least it doesn't ruin the whole file, and a comment of # pylint: enable=xxx is easy to find when you want to go cleaning up later on (like if they add good-names to in-file message control)