pylint-bot / test

0 stars 0 forks source link

Support for Python.NET #159

Open pylint-bot opened 8 years ago

pylint-bot commented 8 years ago

Originally reported by: Benedikt Reinartz (BitBucket: filmor, GitHub: @filmor?)


Currently, it is not possible to properly use pylint on modules using .NET classes through Python.NET, as the imports fail. This is due to modutils.find_from_modpath essentially relying on imp.find_module, which does not work for this kind of pseudo-module.

I'd gladly work on a PR if one can provide me a hint on how this is supposed to be handled.


pylint-bot commented 8 years ago

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore?):


Python.NET is IronPython or it's different? I will be happy to assist you on a PR, but first I got to see why it fails. ;-)

pylint-bot commented 8 years ago

Original comment by Benedikt Reinartz (BitBucket: filmor, GitHub: @filmor?):


No, Python.NET is a library to import and use CLR assemblies like Python modules.

I don't know yet what the exact loading mechanism is, it's not exposed to Python, but it allows you to do stuff like from System import String to use .NET classes.

pylint-bot commented 8 years ago

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore?):


Probably we could fix this by adding AST transforms. Have a look at astroid.brain, there's a bunch of transforms that could be useful for inspiration. Adding support for this in modutils doesn't seem the right approach.