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 __all__ #83

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Fix __all__ #83

merged 1 commit into from
Jun 3, 2024

Conversation

gmarkall
Copy link
Contributor

@gmarkall gmarkall commented Jun 3, 2024

The definition of __all__ has never been correct, and it has not been possible to import * from pynvjitlink, which resulted in an error instead, e.g.:

In [1]: from pynvjitlink import *
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[1], line 1
----> 1 from pynvjitlink import *

File <frozen importlib._bootstrap>:1227, in _handle_fromlist(module, fromlist, import_, recursive)

File <frozen importlib._bootstrap>:1223, in _handle_fromlist(module, fromlist, import_, recursive)

TypeError: Item in pynvjitlink.__all__ must be str, not type

This fixes the issue by putting strings in __all__.

The definition of `__all__` has never been correct, and it has not been
possible to import `*` from `pynvjitlink`, which resulted in an error
instead, e.g.:

```
In [1]: from pynvjitlink import *
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[1], line 1
----> 1 from pynvjitlink import *

File <frozen importlib._bootstrap>:1227, in _handle_fromlist(module, fromlist, import_, recursive)

File <frozen importlib._bootstrap>:1223, in _handle_fromlist(module, fromlist, import_, recursive)

TypeError: Item in pynvjitlink.__all__ must be str, not type
```

This fixes the issue by putting strings in `__all__`.
@gmarkall gmarkall requested a review from a team as a code owner June 3, 2024 11:59
@brandon-b-miller
Copy link
Contributor

Thanks @gmarkall !

@gmarkall gmarkall merged commit e8c7375 into rapidsai:main Jun 3, 2024
49 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.

2 participants