I have a set of Python scripts running in a vendor's SaaS environment that limits some of the features of Python (due to how they're running our scripts under the covers, in some kind of custom interactive environment).
For example, generators and lambdas are not valid.
There is also a non-Pythonic include statement with the syntax @include "Filename" that is preprocessed by the vendor like a C-include, where it just copy-pastes the referenced Python file into the referencing script.
I'd like to be able to lint my code and have it both:
- understand and ignore the
@includestatements - understand how to modify Pylint's behavior to catch generators and lambdas
- (optionally) understand system-specific global variables that are outside of the scope of the file being linted but always available at runtime in the SaaS
Is there any way to do this by modifying Pylint?
Bonus points if your solution does not modify the files you're linting (ie. un/comment out the @include).