Skip to content

"camelcase imported as lowercase" failure in an import of a package or module #201

Description

@ericbn

For example, this code:

import SalesforcePy.commons as sfc

fails with:

./test.py:1:2: N813 camelcase 'SalesforcePy.commons' imported as lowercase 'sfc'

Shouldn't pep-naming just look at the package name being imported (commons) instead of looking at the parent package names too consider this is an import of a package or module, and then not fail in this case?

I'm assuming this rule exists for when a class name is being imported, as discussed in https://stackoverflow.com/a/37590149/2654518. In this case:

from SalesforcePy.commons import BaseRequest as baserequest

sure should fail with:

./test.py:1:2: N813 camelcase 'BaseRequest' imported as lowercase 'baserequest'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions