Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use a context manager for fake home directories.home-fix | Florian Bruhin | 2015-07-25 | 1 | -37/+27 |
| | |||||
* | Fix tests when $HOME is unset in the environment. | Florian Bruhin | 2015-07-25 | 1 | -6/+15 |
| | | | | | | | | tox beginning with v2.0 does hide most environment from the tests, which means getting $HOME/$USERDIR to reset it later will fail. With this change, we delete the variable when it wasn't set when starting the test. | ||||
* | Don't emit no-init if not all the bases from a class are known. | Claudiu Popa | 2015-07-22 | 3 | -3/+10 |
| | | | | Closes issue #604. | ||||
* | Remove unused variable. | Claudiu Popa | 2015-07-16 | 1 | -1/+0 |
| | |||||
* | Fix a typo. | Claudiu Popa | 2015-07-16 | 1 | -1/+1 |
| | |||||
* | Merged in jfleach/removed-broken-link-and-replaced-with-th-1436980631932 ↵ | John Leach | 2015-07-15 | 0 | -0/+0 |
|\ | | | | | | | | | | | (pull request #1) Removed broken link and replaced with the logilab-common URL. | ||||
* | | Close branch jfleach/removed-broken-link-and-replaced-with-th-1436980631932jfleach/removed-broken-link-and-replaced-with-th-1436980631932 | John Leach | 2015-07-15 | 0 | -0/+0 |
| | | |||||
* | | Removed broken link and replaced with the logilab-common URL. | John Leach | 2015-07-15 | 1 | -1/+1 |
|/ | |||||
* | Improve detection of relative imports in non-packages, as well as importing ↵ | Claudiu Popa | 2015-07-14 | 9 | -9/+39 |
| | | | | | | | missing modules with a relative import from a package. The change improves how relative imports are shown when they are missing, with the absolute name, instead of the relative one. | ||||
* | Get the ignored modules only once and save the result in the imports checker. | Claudiu Popa | 2015-07-14 | 1 | -3/+4 |
| | |||||
* | Make a test less stricter by checking that only one message line is expected. | Claudiu Popa | 2015-07-14 | 1 | -7/+2 |
| | |||||
* | Cleanup some tests. | Claudiu Popa | 2015-07-13 | 3 | -16/+35 |
| | |||||
* | Update pylint to use the new astroid.parse, not testutils.build_module. | Claudiu Popa | 2015-07-13 | 8 | -22/+29 |
| | |||||
* | Fix the previous commit, only ignored-modules should use patterns, not ↵ | Claudiu Popa | 2015-07-08 | 3 | -37/+62 |
| | | | | | | ignored-classes. Thanks to The-Compiler for noticing the discrepancy. | ||||
* | ignored-classes option can work with qualified names, as well as with Unix ↵ | Claudiu Popa | 2015-07-07 | 4 | -10/+71 |
| | | | | | | patterns. Closes issues #244 and #297. | ||||
* | Remove trailing whitespace. | Claudiu Popa | 2015-07-06 | 1 | -1/+1 |
| | |||||
* | Fix a not-context-manager false positive. | Claudiu Popa | 2015-07-06 | 3 | -5/+62 |
| | | | | | | | | | | | | | | | | | If the parent of the generator is not the context manager itself, that means that it could have been returned from another function which was the real context manager. The approach we took is more of a hack rather than a real solution: use an inference context when inferring the context manager value in order to store all the inferred statements. Walk all the inferred statements for the given *ctx_mgr* and if we find one function scope which is decorated, consider it to be the real manager and give up, otherwise emit not-context-manager. The problem is that we can't say for sure what the context manager actually is, because the inference will just return the final result (which in the case of using contextlib.contextmanager, it can be a generator). See the test file for not_context_manager for a couple of self explaining tests. Closes issue #577. | ||||
* | Use safe_infer and has_known_bases from astroid.helpers. Closes issue #593. | Claudiu Popa | 2015-07-06 | 10 | -86/+61 |
| | |||||
* | We understand namedtuple._replace properly (in a static analysis sense of ↵ | Claudiu Popa | 2015-07-06 | 1 | -2/+1 |
| | | | | course), so remove wrong assumption. | ||||
* | Add a new error, 'nonlocal-and-global'. | Claudiu Popa | 2015-07-06 | 5 | -1/+40 |
| | | | | | | This error is emitted when a name is found to be both nonlocal and global in the same scope. This is a SyntaxError in Python 2, but Python 3's ast happily parses it, so it needs to be a separate error. Closes issue #581. | ||||
* | Simplify error_of_type by using ExceptHandler.catch. | Claudiu Popa | 2015-07-05 | 2 | -18/+4 |
| | |||||
* | Enable misplaced-future for Python 3. Closes issue #580. | Claudiu Popa | 2015-07-03 | 6 | -6/+13 |
| | |||||
* | Ignore mixin classes when emitting not-context-manager, to avoid false ↵ | Claudiu Popa | 2015-07-03 | 2 | -0/+17 |
| | | | | positives. | ||||
* | Fix failing test, due to how tox (or drone.io) works: there are multiple ↵ | Claudiu Popa | 2015-07-03 | 1 | -10/+2 |
| | | | | copies of pylint installed in different places. | ||||
* | Fix bad whitespace. | Claudiu Popa | 2015-07-03 | 1 | -1/+1 |
| | |||||
* | New imported features from astroid into pyreverse. | Claudiu Popa | 2015-07-03 | 7 | -21/+199 |
| | | | | | | We moved pyreverse.inspector.Project, pyreverse.inspector.project_from_files and pyreverse.inspector.interfaces. These were moved since they didn't belong in astroid and they can be better maintained inside pyreverse itself. | ||||
* | Remove a couple of faulty tests | Claudiu Popa | 2015-07-02 | 3 | -16/+6 |
| | | | | | | logilab.common 1.0+ is now a namespace package, which has the side effect that it is considered builtin, which makes the no-member check to not emit a message in certain situations. | ||||
* | Disable for unsupported-binary-operation | Claudiu Popa | 2015-07-02 | 3 | -2/+6 |
| | | | | | | | | Unfortunately, this warning exhibits currently way too many false positives, practically rendering this error useless. I can't fix all of them until I release Pylint 1.5, so the most reasonable choice for now is to disable it and reenable it as soon as we fix those problems. | ||||
* | Stop using logilab.common.__pkginfo__ | Julien Cristau | 2015-06-30 | 1 | -1/+1 |
| | | | | | We only need the version, and it's available directly in logilab.common. Closes issue #575 | ||||
* | Add test for issue #523, which was solved in astroid. Closes issue #523. | Claudiu Popa | 2015-06-30 | 2 | -1/+16 |
| | |||||
* | Add a new error, 'unsupported-binary-operation'. | Claudiu Popa | 2015-06-30 | 7 | -12/+116 |
| | | | | | | This error is emitted when two a binary arithmetic operation is executed between two objects which don't support it (a number plus a string for instance). | ||||
* | Merged in noamraph/pylint/rename-F0401-to-E0401 (pull request #256) | Claudiu Popa | 2015-06-29 | 4 | -8/+8 |
|\ | | | | | | | Rename F0401 (import-error) to E0401 as it is not a fatal pylint error | ||||
| * | Rename F0401 (import-error) to E0401 as it is not a fatal pylint errorrename-F0401-to-E0401 | Noam Yorav-Raphael | 2015-06-29 | 4 | -8/+8 |
|/ | |||||
* | Add tests for understanding constructors after a type() call. | Claudiu Popa | 2015-06-27 | 2 | -1/+19 |
| | |||||
* | Move the property into a private function and call it in Checker.open. | Claudiu Popa | 2015-06-26 | 1 | -10/+12 |
| | |||||
* | Add tests for checking that calling constructors from class methods with ↵ | Claudiu Popa | 2015-06-26 | 2 | -0/+24 |
| | | | | invalid signatures are detected properly. | ||||
* | Remove deque specialized code, since it is already handled by astroid. | Claudiu Popa | 2015-06-26 | 1 | -5/+0 |
| | |||||
* | Verify explicitly that a class is not a known exception class. | Claudiu Popa | 2015-06-26 | 3 | -3/+34 |
| | | | | | | This catches a couple of builtins which weren't previously detected when checking for catching-non-exception, because all builtins were exempted from this check. | ||||
* | Add a new error, 'star-needs-assignment-target'. | Claudiu Popa | 2015-06-26 | 5 | -2/+28 |
| | | | | | | This error is emitted on Python 3 when a Starred expression (*x) is not used in an assignment target. This is not caught when parsing the AST on Python 3, so it needs to be a separate check. | ||||
* | Add a new error for the Python 3 porting checker, `import-star-module-level`. | Claudiu Popa | 2015-06-25 | 3 | -1/+24 |
| | | | | | | This error is used when a star import is detected in another scope than the module level, which is an error on Python 3. Using this will emit a SyntaxWarning on Python 2. | ||||
* | Detect a couple of objects which can't be base classes (bool, slice, range ↵ | Claudiu Popa | 2015-06-25 | 4 | -2/+32 |
| | | | | and memoryview, which weren't detected until now). | ||||
* | Add a new error, 'invalid-star-assignment-target'. | Claudiu Popa | 2015-06-25 | 5 | -1/+22 |
| | | | | | This error is emitted when a starred expression (*x) is used as the lhs side of an assignment, as in `*x = [1, 2]`. This is not a SyntaxError on Python 3 though. | ||||
* | Add a new error, 'too-many-star-expressions'. | Claudiu Popa | 2015-06-25 | 5 | -0/+22 |
| | | | | | The error is emitted when there are more than one starred expression (*x) in an assignment. The warning is emitted only on Python 3. | ||||
* | yield-outside-func is also emitted for `yield from`. | Claudiu Popa | 2015-06-25 | 5 | -2/+18 |
| | |||||
* | Add tests for checking the ability to understand one-argument type builtin. | Claudiu Popa | 2015-06-24 | 2 | -2/+8 |
| | |||||
* | Disable not-callable because NotImplemented is inferred correctly now (and ↵ | Claudiu Popa | 2015-06-23 | 1 | -1/+1 |
| | | | | we call it in the test). | ||||
* | Add the new __matmul__ and __rmatmul__ dunder methods to the list of known ↵ | Claudiu Popa | 2015-06-21 | 1 | -1/+2 |
| | | | | special methods. | ||||
* | Move the code which checks undefined-all-variable into a new private function. | Claudiu Popa | 2015-06-20 | 1 | -40/+47 |
| | |||||
* | Don't emit undefined-all-variable for nodes which can't be inferred (which ↵ | Claudiu Popa | 2015-06-20 | 6 | -10/+14 |
| | | | | returns YES from inference). | ||||
* | Don't emit not-context-manager for instances with unknown bases. | Claudiu Popa | 2015-06-20 | 2 | -1/+13 |
| |