summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Use a context manager for fake home directories.home-fixFlorian Bruhin2015-07-251-37/+27
|
* Fix tests when $HOME is unset in the environment.Florian Bruhin2015-07-251-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 Popa2015-07-223-3/+10
| | | | Closes issue #604.
* Remove unused variable.Claudiu Popa2015-07-161-1/+0
|
* Fix a typo.Claudiu Popa2015-07-161-1/+1
|
* Merged in jfleach/removed-broken-link-and-replaced-with-th-1436980631932 ↵John Leach2015-07-150-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-1436980631932John Leach2015-07-150-0/+0
| |
* | Removed broken link and replaced with the logilab-common URL.John Leach2015-07-151-1/+1
|/
* Improve detection of relative imports in non-packages, as well as importing ↵Claudiu Popa2015-07-149-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 Popa2015-07-141-3/+4
|
* Make a test less stricter by checking that only one message line is expected.Claudiu Popa2015-07-141-7/+2
|
* Cleanup some tests.Claudiu Popa2015-07-133-16/+35
|
* Update pylint to use the new astroid.parse, not testutils.build_module.Claudiu Popa2015-07-138-22/+29
|
* Fix the previous commit, only ignored-modules should use patterns, not ↵Claudiu Popa2015-07-083-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 Popa2015-07-074-10/+71
| | | | | | patterns. Closes issues #244 and #297.
* Remove trailing whitespace.Claudiu Popa2015-07-061-1/+1
|
* Fix a not-context-manager false positive.Claudiu Popa2015-07-063-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 Popa2015-07-0610-86/+61
|
* We understand namedtuple._replace properly (in a static analysis sense of ↵Claudiu Popa2015-07-061-2/+1
| | | | course), so remove wrong assumption.
* Add a new error, 'nonlocal-and-global'.Claudiu Popa2015-07-065-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 Popa2015-07-052-18/+4
|
* Enable misplaced-future for Python 3. Closes issue #580.Claudiu Popa2015-07-036-6/+13
|
* Ignore mixin classes when emitting not-context-manager, to avoid false ↵Claudiu Popa2015-07-032-0/+17
| | | | positives.
* Fix failing test, due to how tox (or drone.io) works: there are multiple ↵Claudiu Popa2015-07-031-10/+2
| | | | copies of pylint installed in different places.
* Fix bad whitespace.Claudiu Popa2015-07-031-1/+1
|
* New imported features from astroid into pyreverse.Claudiu Popa2015-07-037-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 testsClaudiu Popa2015-07-023-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-operationClaudiu Popa2015-07-023-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 Cristau2015-06-301-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 Popa2015-06-302-1/+16
|
* Add a new error, 'unsupported-binary-operation'.Claudiu Popa2015-06-307-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 Popa2015-06-294-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-E0401Noam Yorav-Raphael2015-06-294-8/+8
|/
* Add tests for understanding constructors after a type() call.Claudiu Popa2015-06-272-1/+19
|
* Move the property into a private function and call it in Checker.open.Claudiu Popa2015-06-261-10/+12
|
* Add tests for checking that calling constructors from class methods with ↵Claudiu Popa2015-06-262-0/+24
| | | | invalid signatures are detected properly.
* Remove deque specialized code, since it is already handled by astroid.Claudiu Popa2015-06-261-5/+0
|
* Verify explicitly that a class is not a known exception class.Claudiu Popa2015-06-263-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 Popa2015-06-265-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 Popa2015-06-253-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 Popa2015-06-254-2/+32
| | | | and memoryview, which weren't detected until now).
* Add a new error, 'invalid-star-assignment-target'.Claudiu Popa2015-06-255-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 Popa2015-06-255-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 Popa2015-06-255-2/+18
|
* Add tests for checking the ability to understand one-argument type builtin.Claudiu Popa2015-06-242-2/+8
|
* Disable not-callable because NotImplemented is inferred correctly now (and ↵Claudiu Popa2015-06-231-1/+1
| | | | we call it in the test).
* Add the new __matmul__ and __rmatmul__ dunder methods to the list of known ↵Claudiu Popa2015-06-211-1/+2
| | | | special methods.
* Move the code which checks undefined-all-variable into a new private function.Claudiu Popa2015-06-201-40/+47
|
* Don't emit undefined-all-variable for nodes which can't be inferred (which ↵Claudiu Popa2015-06-206-10/+14
| | | | returns YES from inference).
* Don't emit not-context-manager for instances with unknown bases.Claudiu Popa2015-06-202-1/+13
|