Skip to content

false negative with dangerous-default-value #7818

Closed
@dpinol

Description

@dpinol

Bug description

# pylint: disable=missing-module-docstring
class Clazz:
    # pylint: disable=missing-docstring, too-few-public-methods
    def __init__(
        self,
        arg: str = None,
        *,
        kk: dict = {},
    ) -> None:
        pass

Configuration

No response

Command used

pylint filename.py

Pylint output

-------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 6.67/10, +3.33)

Expected behavior

4: W0102: Dangerous default value {} as argument (dangerous-default-value)

Pylint version

pylint 2.15.6
astroid 2.12.13
Python 3.10.8 (main, Oct 18 2022, 14:58:34) [GCC 11.2.0]

OS / Environment

ubuntu 22.4

Additional dependencies

No response

Metadata

Metadata

Assignees

Labels

Bug 🪲False Negative 🦋No message is emitted but something is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementation

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions