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

Improve symbol visibility when importing #5150

Merged
merged 1 commit into from
Nov 8, 2023
Merged

Conversation

klecki
Copy link
Contributor

@klecki klecki commented Nov 7, 2023

Category: Bug fix?

Description:

The PEP describing stub files: https://peps.python.org/pep-0484/#stub-files
mandates using from A import X as X syntax in stub files to mark symbols as
reexported. The same syntax is used inside the regular module, making the
VSCode intellisense pick up the adjusted symbols better.

In case of import nvidia.dali.types as t, we had:

t.DALIDat<space> # not working
t.DALIDataType.<space> # list the enum members correctly

now, the intellisense lists the enum types correctly:
obraz

Additional information:

Affected modules and functionalities:

nvidia.dali.types symbol visibility in some code completion engines.

Key points relevant for the review:

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

Signed-off-by: Krzysztof Lecki <klecki@nvidia.com>
@klecki
Copy link
Contributor Author

klecki commented Nov 7, 2023

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [10632841]: BUILD STARTED

@stiepan stiepan self-assigned this Nov 7, 2023
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [10632841]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [10632841]: BUILD PASSED

@awolant awolant self-assigned this Nov 8, 2023
@klecki klecki merged commit d5e154b into NVIDIA:main Nov 8, 2023
5 checks passed
@klecki klecki deleted the reimport-as branch November 8, 2023 10:36
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.

4 participants