Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Create ``ContextManagerModel`` and let ``GeneratorModel`` inherit | Daniël van Noord | 2022-09-29 | 1 | -0/+47 | |
| | ||||||
* | Handle empty ``modname`` in ``ast_from_module_name`` (#1801) | Daniël van Noord | 2022-09-23 | 1 | -0/+4 | |
| | ||||||
* | improve is_namespace check | Saugat Pachhai (सौगात) | 2022-09-23 | 1 | -0/+9 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://stackoverflow.com/a/42962529. Let's take the following contents as an example: ```python import celery.result ``` From #1777, astroid started to use `processed_components` for namespace check. In the above case, the `modname` is `celery.result`, it first checks for `celery` and then `celery.result`. Before that PR, it'd always check for `celery.result`. `celery` is recreating module to make it lazily load. See https://github.com/celery/celery/blob/34533ab44d2a6492004bc3df44dc04ad5c6611e7/celery/__init__.py#L150. This module does not have `__spec__` set. Reading through Python's docs, it seems that `__spec__` can be set to None, so it seems like it's not a thing that we can depend upon for namespace checks. See https://docs.python.org/3/reference/import.html#spec__. --- The `celery.result` gets imported for me when pylint-pytest plugin tries to load fixtures, but this could happen anytime if any plugin imports packages. In that case, `importlib.util._find_spec_from_path("celery")` will raise ValueError since it's already in `sys.modules` and does not have a spec. Fixes https://github.com/PyCQA/pylint/issues/7488. | |||||
* | [flake8] Set the max line length to 110 instead of 138 | Pierre Sassoulas | 2022-09-19 | 4 | -10/+13 | |
| | | | | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com> | |||||
* | Fixed the ``__init__`` of ``dataclassess`` with multiple inheritance (#1774) | Daniël van Noord | 2022-09-07 | 1 | -0/+132 | |
| | ||||||
* | Fix a crash on ``namedtuples`` that use ``typename`` (#1773) | Daniël van Noord | 2022-09-07 | 1 | -0/+17 | |
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | |||||
* | Fix crash in ``dataclass`` brain (#1770) | Daniël van Noord | 2022-09-06 | 1 | -0/+24 | |
| | ||||||
* | Parse default values in ``dataclass`` attributes correctly (#1771) | Daniël van Noord | 2022-09-06 | 1 | -0/+41 | |
| | ||||||
* | Fix crash in ``dataclass`` brain (#1768) | Daniël van Noord | 2022-09-06 | 1 | -0/+23 | |
| | ||||||
* | Handle ``dataclass`` ``kw_only`` keyword correctly (#1764) | Daniël van Noord | 2022-09-05 | 1 | -2/+79 | |
| | | | Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> | |||||
* | Fix a crash involving `Uninferable` args to `namedtuple` (#1763) | Jacob Walls | 2022-09-04 | 1 | -0/+20 | |
| | ||||||
* | Prevent first-party imports from being resolved to `site-packages` (#1756) | Jacob Walls | 2022-08-29 | 1 | -1/+4 | |
| | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | |||||
* | Fix namespace package detection for frozen stdlib modules on PyPy (#1757) | Jacob Walls | 2022-08-27 | 1 | -1/+12 | |
| | ||||||
* | Fix crash involving non-standard type comments (#1753) | Daniël van Noord | 2022-08-25 | 1 | -0/+8 | |
| | ||||||
* | Don't rely on the module cache when "importing self" (#1747) | Daniël van Noord | 2022-08-23 | 2 | -0/+20 | |
| | | | Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> | |||||
* | Remove str instance in model of BaseException.attrs (#1749) | Daniël van Noord | 2022-08-23 | 1 | -0/+15 | |
| | | | | | | | | Do not require first exception argument to be a string. The word "usually" does not imply an obligation. https://docs.python.org/3/library/exceptions.html#BaseException.args Co-authored-by: Nicholas Guriev <nicholas@guriev.su> | |||||
* | Fix false positive with inference of `http` module (#1742) | Mark Byrne | 2022-08-23 | 1 | -1/+14 | |
| | | | | Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | |||||
* | Don't add ``KW_ONLY`` fields to dataclass fields (#1746) | Daniël van Noord | 2022-08-22 | 1 | -0/+34 | |
| | ||||||
* | Fix crash with inference of type-annotated Enum classes (#1743) | Mark Byrne | 2022-08-19 | 1 | -0/+19 | |
| | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> | |||||
* | Fix a crash inferring invalid string formatting with `%` | Jacob Walls | 2022-08-12 | 1 | -0/+1 | |
| | ||||||
* | Fix crash in `ExplicitNamespacePackageFinder` (#1714) | Jacob Walls | 2022-08-09 | 1 | -0/+17 | |
| | | | | | | | * Add skip if no `six` * `urllib3` does appear to be required * Check `submodule_search_locations` Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | |||||
* | [pre-commit.ci] pre-commit autoupdate (#1726) | pre-commit-ci[bot] | 2022-08-08 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v2.37.2 → v2.37.3](https://github.com/asottile/pyupgrade/compare/v2.37.2...v2.37.3) - https://github.com/Pierre-Sassoulas/black-disable-checker/: v1.1.0 → v1.1.1 - [github.com/PyCQA/flake8: 4.0.1 → 5.0.3](https://github.com/PyCQA/flake8/compare/4.0.1...5.0.3) * Disable line too long and line break before binary operator As there's a lot of the format and the latter is incompatible with black. * [flake8] Deactivate the check for return and yield together It's opinionated see https://github.com/PyCQA/flake8-bugbear/issues/2 and every current warning is a false positive. * Explain falke8 disables Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | |||||
* | Fix false positive with inference of type-annotated Enum classes. (#1734) | Mark Byrne | 2022-08-07 | 1 | -0/+72 | |
| | | | Refs PyCQA/pylint#7265 | |||||
* | Fixes #1717 - ignore FutureWarnings which are raised by pandas (#1719) | Tim Paine | 2022-07-23 | 2 | -0/+38 | |
| | | | | | And probably other modules too. | |||||
* | Catch RecursionError in ``raise_if_nothing_inferred`` (#1705) | Daniël van Noord | 2022-07-11 | 1 | -1/+19 | |
| | ||||||
* | Prevent applying boolean ops to `NotImplemented` (#1702) | Jacob Walls | 2022-07-10 | 1 | -0/+6 | |
| | ||||||
* | Only infer module operations on string ``Const`` nodes (#1701) | Daniël van Noord | 2022-07-10 | 1 | -0/+1 | |
| | ||||||
* | Fix a crash when inferring old-style string formatting (`%`) using tuples ↵ | Jacob Walls | 2022-07-09 | 1 | -0/+3 | |
| | | | | (#1697) | |||||
* | Fix a crash when `None` participates in a `**` expression (#1696) | Jacob Walls | 2022-07-09 | 1 | -0/+4 | |
| | ||||||
* | Fix a crash involving properties within `if` blocks | Jacob Walls | 2022-07-09 | 1 | -0/+20 | |
| | ||||||
* | Fix a crash involving properties within ``try ... except`` blocks | Daniël van Noord | 2022-07-08 | 1 | -0/+24 | |
| | ||||||
* | Add ``__init__`` to the ``ObjectModel`` and return ``BoundMethods`` (#1687) | Daniël van Noord | 2022-07-06 | 2 | -4/+100 | |
| | | | Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> | |||||
* | Fix order of attribute look ups for Super (#1686) | Daniël van Noord | 2022-07-06 | 2 | -1/+61 | |
| | ||||||
* | Fix ``pylint`` issues and remove useless disables | Daniël van Noord | 2022-07-06 | 3 | -5/+3 | |
| | ||||||
* | Add brain for numpy core module ``einsumfunc``. (#1656) | Mark Byrne | 2022-07-06 | 1 | -0/+58 | |
| | | | Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | |||||
* | Add ``__new__`` and ``__call__`` to``ObjectModel`` and ``ClassModel`` (#1606) | Daniël van Noord | 2022-07-03 | 1 | -0/+18 | |
| | ||||||
* | Prevent creating `Instance` that proxies another `Instance` when inferring ↵ | Jacob Walls | 2022-07-02 | 1 | -0/+9 | |
| | | | | `__new__(cls)` (#1682) | |||||
* | Avoid inferring all subscripted names in `pathlib` brain (#1671) | Jacob Walls | 2022-06-29 | 1 | -8/+2 | |
| | ||||||
* | Fix inference of living container elements (#1663) | Daniël van Noord | 2022-06-25 | 1 | -0/+38 | |
| | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> | |||||
* | Refs #1662: Condition `usedforsecurity` support on Py3.9+ (#1665) | Jacob Walls | 2022-06-25 | 1 | -2/+6 | |
| | ||||||
* | `hashlib`: Add support for `usedforsecurity` keyword (#1662) | Jacob Walls | 2022-06-25 | 1 | -2/+2 | |
| | ||||||
* | Fix the qt brain for Signals on PySide 2 and 6 (#1654) | adam-grant-hendry | 2022-06-25 | 1 | -1/+1 | |
| | | | | Co-authored-by: Hendry, Adam <adam.hendry@medtronic.com> Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | |||||
* | Revert #893: Avoid setting a Call as a base for metaclasses from ↵ | Jacob Walls | 2022-06-23 | 1 | -1/+17 | |
| | | | | six.with_metaclass() (#1622) | |||||
* | Avoid performing `**` operations on values greater than 1e5 | Jacob Walls | 2022-06-21 | 1 | -0/+6 | |
| | ||||||
* | Remove remaining references to old Mixin base nodes | Daniël van Noord | 2022-06-20 | 1 | -1/+1 | |
| | ||||||
* | Infer modulo operations on strings (#1617) | Daniël van Noord | 2022-06-17 | 1 | -1/+112 | |
| | ||||||
* | Infer calls to ``format()`` on variables that are strings (#1616) | Daniël van Noord | 2022-06-12 | 1 | -0/+7 | |
| | ||||||
* | Fix ``str.format`` with ``KeyError`` | Daniël van Noord | 2022-06-11 | 1 | -0/+3 | |
| | ||||||
* | Infer calls to ``str.format`` (#1602) | Daniël van Noord | 2022-06-10 | 3 | -10/+101 | |
| | | | | Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> | |||||
* | `argparse` brain: avoid spurious addition of "namespace" to function locals | Jacob Walls | 2022-06-09 | 1 | -0/+21 | |
| |