Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

When using camel case, private methods with two leading underscores raise invalid-name #10189

Copy link
Copy link
@cwiede

Description

@cwiede
Issue body actions

Bug description

class MyClass:
    def __privateMethod(self):
        pass

Configuration

[BASIC]
method-naming-style=camelCase

Command used

pylint a.py

Pylint output

...
a.py:2:4: C0103: Method name "__privateMethod" doesn't conform to camelCase naming style (invalid-name)
...

Expected behavior

I'd expect that the the name __privateMethod should be OK with the camelCase setting.

Pylint version

pylint 3.3.3
astroid 3.3.8
Python 3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)]

OS / Environment

No response

Additional dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis 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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.