Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to instruct Pylint which libraries should be considered 3rd party?

I am running pylint in an environment where certain import libraries are not available and are 3rd party. As a result, pylint generates an error class wrong-import-order C0411 for these imports.

Is there a way to instruct which should be considered 3rd party?

  • Pylint 2.1.1
  • Python 3.6.3
like image 826
akarapatis Avatar asked Sep 21 '18 13:09

akarapatis


People also ask

When is it not a good idea to use third party libraries?

If the documentation is not good and you have to spend more time discovering how to use the library than it would take you to implement functionality by yourself, then it is obviously not a good choice. Once you have decided to add a specific third party library to your project, it is good to do the following:

Why use a third party source for a project?

Using a third party source for a project is a faster solution that writing your own code and using your own library. Some library have a huge user base, contributors and community around then which makes them well maintained.

Can I link to the source code of a library?

it is generally accepted to only link to the full source code of 3rd party packages. Consult each specific license to be sure, but IMHO providing the link should be enough. For instance, if you use a minified version of a library, you can provide the link to the standard download and be fine.

How should I handle external libraries in an open-source C# project?

tl;dr: How should I handle external libraries in an open-source C# project? If nuget is not available, the cleanest way may be to provide an export script which pulls the source code of the needed library from their external repository (of the library vendor) into your working directory.


1 Answers

Yes, that would be known-third-party, which you can set under [IMPORTS]:

# Force import order to recognize a module as part of a third party library. known-third-party=your modules

like image 157
PCManticore Avatar answered Nov 07 '22 19:11

PCManticore