Skip to content

Commit

Permalink
format, lint, etc
Browse files Browse the repository at this point in the history
Signed-off-by: Martijn Govers <[email protected]>
  • Loading branch information
mgovers committed Aug 20, 2024
1 parent a070691 commit 7e60ba4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ struct PGM_IO_Handle {
};

template <class Exception = std::exception, class Functor>
auto call_with_catch(PGM_IO_Handle* handle, Functor func, PGM_IO_Idx error_code,
std::string_view extra_msg = {}) -> std::invoke_result_t<Functor> {
auto call_with_catch(PGM_IO_Handle* handle, Functor func, PGM_IO_Idx error_code, std::string_view extra_msg = {})
-> std::invoke_result_t<Functor> {
if (handle) {
PGM_IO_clear_error(handle);
}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def generate_build_ext(pkg_dir: Path, pkg_name: str):
pgm_io_c = Path("power_grid_model_io_native_c")
pgm = Path("power_grid_model")
pgm_c = Path("power_grid_model_c")
pgm_pkg_dir = pkg_dir / str(pgm).replace('_', '-')
pgm_pkg_dir = pkg_dir / str(pgm).replace("_", "-")

# include-folders
include_dirs = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from pathlib import Path
from typing import Callable, Optional

from power_grid_model.core.power_grid_core import IdxC, CStr, CharPtr
from power_grid_model.core.power_grid_core import CharPtr, CStr, IdxC

# functions with size_t return
_FUNC_SIZE_T_RES = {"meta_class_size", "meta_class_alignment", "meta_attribute_offset"}
Expand Down
2 changes: 1 addition & 1 deletion tests/c_api_tests/c_api_cpp_handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ template <auto func> struct DeleterFunctor {
// unique pointers
using HandlePtr = std::unique_ptr<PGM_IO_Handle, DeleterFunctor<&PGM_IO_destroy_handle>>;

} // namespace power_grid_model
} // namespace power_grid_model_io_native
1 change: 1 addition & 0 deletions tests/unit/test_vnf_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from power_grid_model_io_native._core.power_grid_model_io_core import pgm_io_core


def test_nothing():
assert pgm_io_core.error_code() == 0
assert pgm_io_core.error_message() == ""

0 comments on commit 7e60ba4

Please sign in to comment.