Skip to content

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Oct 15, 2025

  • Try to match the module name pattern with module names constructed starting from different parent directories of the filename. E.g., for "/path/to/package/module" try to match with "path.to.package.module", "to.package.module", "package.module" and "module".
  • Ignore trailing "/__init__".
  • Ignore trailing ".pyw" on Windows.
  • Keep matching with the full filename (without optional suffix) for compatibility.
  • Only ignore the case of the ".py" extension on Windows.

@serhiy-storchaka
Copy link
Member Author

Since we need the code for Python and C implementations of warn_explicit(), and it is relatively complex, it is only implemented in Python, and the C code imports the Python implementation.

…ut module argument

* Try to match the module name pattern with module names constructed
  starting from different parent directories of the filename.
  E.g., for "/path/to/package/module" try to match with
  "path.to.package.module", "to.package.module", "package.module" and
  "module".
* Ignore trailing "/__init__.py".
* Ignore trailing ".py" on Windows.
* Keep matching with the full filename (without optional ".py" extension)
  for compatibility.
* Only ignore the case of the ".py" extension on Windows.
@serhiy-storchaka
Copy link
Member Author

Ready for review.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant