Skip to content

[BUG] UnexpandableImportStar without expand-stars or expand_stars=true #182

@Avasam

Description

@Avasam

Describe the bug A clear and concise description of what the bug is.

There's star imports of C wrapped modules in the codebase. If I tell pycln to not expand stars, it'll still fail.

To Reproduce Steps to reproduce the behavior:

  1. Take this code snippet:

     from win32api import *
  2. Run this Pycln command:

    $ pycln example.py
  3. Error traceback or unexpected output (if present):

    example.py:1:0 UnexpandableImportStar: 'win32api' module not found or it's a C wrapped module! ⛔

Expected behavior:

  1. Description: A clear and concise description of what you expected to happen.

pycln shouldn't error on unexpandable star imports if its not going to expand star imports.

Environment (please complete the following informations):

  • Python Version: Python 3.9.13
  • Pycln Version: pycln, version 2.1.1
  • OS Type: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions