From e8c7375691537aa41b8c120b5bbffd18fa304b5f Mon Sep 17 00:00:00 2001 From: Graham Markall <535640+gmarkall@users.noreply.github.com> Date: Mon, 3 Jun 2024 14:45:14 +0100 Subject: [PATCH 1/2] Fix `__all__` (#83) 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 :1227, in _handle_fromlist(module, fromlist, import_, recursive) File :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__`. --- pynvjitlink/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pynvjitlink/__init__.py b/pynvjitlink/__init__.py index ddf2819..f56442f 100644 --- a/pynvjitlink/__init__.py +++ b/pynvjitlink/__init__.py @@ -3,4 +3,4 @@ from pynvjitlink.api import NvJitLinker, NvJitLinkError from pynvjitlink._version import __version__ -__all__ = [NvJitLinker, NvJitLinkError, __version__] +__all__ = ["NvJitLinker", "NvJitLinkError", "__version__"] From 9c4c2e8bdca2f8d477e59eb6e2e99b65b919036b Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 3 Jun 2024 10:21:25 -0700 Subject: [PATCH 2/2] Fix pre-commit copyright check (#82) This PR is a small fix for an error I ran into locally on the copyright check. --- .pre-commit-config.yaml | 5 +++-- CMakeLists.txt | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 308ebfa..caeed10 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,11 +9,12 @@ repos: hooks: - id: clang-format - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.7 + rev: v0.4.6 hooks: - id: ruff - id: ruff-format - repo: https://github.com/rapidsai/pre-commit-hooks - rev: v0.0.3 + rev: v0.1.0 hooks: - id: verify-copyright + args: [--fix, --main-branch=main] diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c9f7fb..87aaed4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,5 @@ +# Copyright (c) 2023-2024, NVIDIA CORPORATION. + cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) project(