| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
| |
|
|
| |
References #1199
|
| |
|
|
|
|
| |
* Use 3.10 for Github actions
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
| |
* Fix ``relative-beyond-top-level`` false positive
|
| |
|
|
|
|
|
| |
* Adds unittest dealing with class subscript
* Adds support of type hints inside numpy's brains
* Adds unit test to check astroid does not crash if numpy is not available
|
| |
|
|
|
|
| |
updates:
- [github.com/asottile/pyupgrade: v2.28.0 → v2.29.0](https://github.com/asottile/pyupgrade/compare/v2.28.0...v2.29.0)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Added brain for stdlib signal module, for dynamically generated IntEnums.
* Added static definitions for Signals, Handlers and Sigmasks enums.
* Moved sys.platform checks outside of generated code.
* Added note to brain_signal docstring.
* Added unit tests for brain_signal.py.
|
| |
|
|
|
|
|
|
| |
* Extend attrs brain to support provisional APIs
See https://www.attrs.org/en/stable/api.html?highlight=field#provisional-apis
Co-authored-by: Tamir Bahar <tbahar@vdoo.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.26.0 → v2.28.0](https://github.com/asottile/pyupgrade/compare/v2.26.0...v2.28.0)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
| |
|
| |
Following comment here: https://github.com/PyCQA/astroid/issues/1072\#issuecomment-925471310
|
| |
|
|
|
|
|
|
|
|
|
| |
* Revert modifications of PR 1148. While it is probably still a good idea
to prevent nodes that are dynamically imported to be inferred through an
astroid's brain, the way it was done in builder.py was incorrect.
The way it was done, lead to prevent the use of astroid legetimate
brains even for node that was not dynamically loaded.
* Adds a brain to infer the numpy.ma.masked_where function
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
| |
This deals with PyCQA/pylint#5048
|
| |
|
|
|
|
| |
updates:
- [github.com/psf/black: 21.8b0 → 21.9b0](https://github.com/psf/black/compare/21.8b0...21.9b0)
- [github.com/pre-commit/mirrors-prettier: v2.4.0 → v2.4.1](https://github.com/pre-commit/mirrors-prettier/compare/v2.4.0...v2.4.1)
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Following the upgrade to pylint 2.11.1
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Add inference for Compare nodes
Ref #846.
Identity checks are currently Uninferable as there is no sensible way to
infer that two Instances refer to the same object without accurately
modelling control flow.
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
|
|
|
|
| |
* Add typing in the tests/ directory
* Add some assert for mypy's sake
* Avoid adding mypy_extension by using pytest skip
|
| |
|
|
|
|
|
| |
updates:
- [github.com/asottile/pyupgrade: v2.25.0 → v2.26.0](https://github.com/asottile/pyupgrade/compare/v2.25.0...v2.26.0)
- [github.com/pre-commit/mirrors-prettier: v2.3.2 → v2.4.0](https://github.com/pre-commit/mirrors-prettier/compare/v2.3.2...v2.4.0)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
| |
I've been thinking about ways to get rid of unbounded `while` loops in
the Pylint codebase. A common use is to loop over a node's ancestors.
The `node_ancestors` method centralizes this logic in one place so
that those `while` loops can be rewritten as `for`.
A few uses are made of this new method. It only comes up a few places
in Astroid, but there are many more in Pylint.
|
| |
|
| |
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix crash on datafields
Fixes the crash reported at PyCQA/pylint#4963
Tests added there.
* Change to ``if not``
* Update astroid/brain/brain_dataclasses.py
* Add tests
* Update and merge test
* Use ``raise UseInferenceDefault``
|
| |
|
|
|
|
| |
* Support pyz imports
Closes PyCQA/pylint#3887
|
| |
|
|
| |
Fixes PyCQA/pylint#4370
|
| |
|
|
|
| |
With typing added to parts of the code in ``pylint`` it has become useful
to import this class so ``pylint`` can access it. See discussion in:
https://github.com/PyCQA/pylint/pull/4940
|
| |
|
|
| |
Closes #1162
|
| |
|
|
| |
This is the standard in pylint, and should be for all external code.
|
| |
|
|
|
|
|
|
|
|
|
| |
* Fix missing name value
* Add deprecation warnings to Name nodes
* Add deprecation warnings to Attribute nodes
* Add deprecation warnings for op attribute
* Add deprecation warning to Import nodes
* Add missing 'can be None' comment
* Add changelog entry
* Use decorator to emit DeprecationWarnings
* Require typing-extensions>=3.10
|
| |
|
|
|
|
| |
updates:
- [github.com/asottile/pyupgrade: v2.24.0 → v2.25.0](https://github.com/asottile/pyupgrade/compare/v2.24.0...v2.25.0)
- [github.com/psf/black: 21.7b0 → 21.8b0](https://github.com/psf/black/compare/21.7b0...21.8b0)
|
| | |
|
| | |
|
| |
|
|
|
| |
Sometime it's already possible. see https://github.com/PyCQA/astroid/pull/1141#discussion_r698479656
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Adds some type hints
* Adds a logger module
* Remove this useless module
* It is probably not a good idea to apply transforms on module which have been authorized to be directly imported
* Adds a function named is_module_name_part_of_extension_package_whitelist which returns True if the beginning of a module dotted name is part of the package whitelist in argument
* Adds the extension_package_whitelist variable to the brainless manager in order unittest dealing with this managert to be ok
* Adds two tests that check the behavior of the is_module_name_part_of_extension_package_whitelist function
* Updating Changelog
* Adds explanation to the ChangeLog entry
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
* Adds a brain for the ctypes module and a unittest associated
* Another approach to handle ctypes module
* Update the unittest to take into account the brain_ctypes_bis definition. Adds more tests to be sure that the minimum has been modified through the brain
* Forget this method because the predicate is too large and applies the function for a too broad range of value attributes (i.e for value attribute that do not have a link with the ctypes module)
|
| | |
|
| | |
|