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?
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:
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With