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: Address (#648) Missing FileMode causes an AttributeError in py-rattler and fix missing properties #651

Merged
merged 4 commits into from
May 10, 2024

Conversation

iamthebot
Copy link
Contributor

@iamthebot iamthebot commented May 10, 2024

This contains a fix for #648 by defaulting _inner to None which prevents an AttributeError if trying to get which FileMode we have in the case where the FileMode isn't defined. It further adds an unknown property to check for this case specifically in Python.

I've also added a few property decorators that were missing in that file (eg; for sha256).

Note a few files were also slightly reformatted when running ruff so I've added those to spare folks the trouble later (unit tests/conftest).

@iamthebot
Copy link
Contributor Author

FYI @baszalmstra

@wolfv
Copy link
Member

wolfv commented May 10, 2024

The PR looks good to me but I am wondering if this is the right behavior. I believe that there is a default, probably binary, that should be the default value when the file type is unknown. Let me double check!

@wolfv
Copy link
Member

wolfv commented May 10, 2024

OK, I double checked and now I do think that this is the correct behavior! Sorry for the noise.

@iamthebot
Copy link
Contributor Author

@wolfv no worries! Yeah, this FileMode is not present (typically) if there is no placeholder in a path entry (whether for a package or a prefix entry eg; in conda-meta).

…erties for paths_data entries in py-rattler

run ruff

run ruff
Copy link
Collaborator

@baszalmstra baszalmstra left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@baszalmstra baszalmstra merged commit ab2bd4d into mamba-org:main May 10, 2024
4 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.

None yet

3 participants