Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Ignore .pth files that are not utf-8 encoded, for example PyTorch files #301

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

qthequartermasterman
Copy link
Contributor

Fixes #300.

This PR changes how .pth files are handled. Instead of raising an error for non UTF-8 encoded .pth files, they should just be skipped. This is a convenient way to filter out .pth files generated by PyTorch, and which are not path configuration files.

@qthequartermasterman
Copy link
Contributor Author

@pawamoy The failures in CI do not seem related to these changes.

src/griffe/finder.py Outdated Show resolved Hide resolved
Copy link
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! LGTM.

@pawamoy pawamoy merged commit ea299dc into mkdocstrings:main Jul 3, 2024
21 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: .pth files generated by PyTorch are incompatible with path configuration file handling
2 participants