-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pylint vs epylint for editor usage #3606
Comments
One additional comment: |
We don't have emacs user in the contributors, we don't even know if epylint is used a lot. It seems no one read the doc on emacs at least and very few issues are opened. I can't answer any your questions for example because I never touched this part of the code or used it. So we need someone willing to maintain epylint so it's maintained. Alternatively it feel like we could simply remove it in 3.0 and not a lot would happen (I added the need decision label). |
See b2462c9 |
It's good to clarify the status of epylint, but most of the questions in the original OP were not about it, but about the right way to invoke pylint itself; maybe these can still be answered? (Though we've made some educated guesses over the last 2.5 years in Flycheck, so it's a bit less relevant now) |
We do have an emacs user in the contributor now (@nickdrozd) it does not mean we can answer the questions without retro-engineering though. @cpitclaudel your educated guess are probably the most reliable source of knowledge we have. In particular if epylint is useful for you please tell us so we revert the decision to remove it from pylint :) |
Thanks @Pierre-Sassoulas ! The questions I wanted help with were these, which I don't think involve epylint:
The long story short about this question is that we have somewhat elaborate logic in Flycheck to find the working directory to use to call pylint (Flycheck is an emacs frontend for checkers that has support for flycheck among others). We don't use epylint, but we noticed that it has its own logic to do search for the right working directory to call pylint from, and we use roughly the same algorithm (reimplemented). |
We implemented a recursive option in pylint to find the file to lint in a directory so I would use that alongside with an appropriate reporter, probably a custom json reporter (or the official one). It seems epylint was done specifically for IDE integration but the knowledge got lost and as maintainers don't know much about epylint the most well tested and maintained entry-point is definitely pylint now. The idea is definitely that pylint will be launched at the root of the repository but if it's not the root of the repository you'll have to ask the user what it is. We're also going to search for configuration files to make it search up the tree until it hits a configuration file or a .git / .hg directory (#7143) so that might also be the way to get the root directory programmatically ? We did not plan to expose that as an API but we could if it's useful to someone. |
Flycheck currently uses pylint, but there are some caveats and epylint seems to address them. In a recent discussion (flycheck/flycheck#1758), @cpitclaudel raised some questions about the usage of epylint, why isn't it integrated into pylint, for example. The questions are pasted below.
Questions
Example:
Another question
pylint.epylint, when used with runpy.run_module, returns a globals dictionary from which we might use, for example, the Run function:
globals_dictionary['Run']()
. This happens because epylint isn't a package. Could it be made into a package, with its own main.py?Current version requires:
If it were a package, with a main.py:
The text was updated successfully, but these errors were encountered: