Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anze3db/pylint-example
https://github.com/anze3db/pylint-example
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/anze3db/pylint-example
- Owner: anze3db
- Created: 2015-06-24T20:54:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-24T20:55:06.000Z (over 9 years ago)
- Last Synced: 2024-11-01T04:42:37.373Z (about 2 months ago)
- Language: Python
- Size: 93.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pylint example
`module_two` uses `TestSomething` defined in `module_one` and running
`pylint module_two` resulted in:```
************* Module tests.module_two.test_something_else
W: 7, 0: Class has no __init__ method (no-init)
E: 11, 8: Instance of 'TestSomethingElse' has no 'assertEquals' member (no-member)
```The issue was that `TestModule` imported something not in my pythonpath
`from flask.ext.testing import TestCase`. Of course, pylint picks this up
correctly:```
************* Module tests.module_one.test_something
F: 3, 0: Unable to import 'flask.ext.testing' (import-error)
W: 7, 0: Class has no __init__ method (no-init)
E: 11, 8: Instance of 'TestSomething' has no 'assertEquals' member (no-member)
R: 7, 0: Too few public methods (1/2) (too-few-public-methods)
```But I still missed it because the code I was was working on is huge
(even with the correctly set up PYTHONPATH the original module_one has
more than 500 lint warnings :/).