func to prop

This commit is contained in:
Erik Fröjdh 2024-11-05 16:00:11 +01:00
parent 7f244e22a2
commit 2efb763242
2 changed files with 5 additions and 5 deletions

View File

@ -106,7 +106,7 @@ class CtbRawFile(_aare.CtbRawFile):
Returns:
int: Size of image in bytes.
"""
return super().image_size_in_bytes()
return super().image_size_in_bytes
def __len__(self) -> int:
"""Return the number of frames in the file.
@ -114,7 +114,7 @@ class CtbRawFile(_aare.CtbRawFile):
Returns:
int: Number of frames in file.
"""
return super().frames_in_file()
return super().frames_in_file
def frames_in_file(self) -> int:
"""Return the number of frames in the file.
@ -122,7 +122,7 @@ class CtbRawFile(_aare.CtbRawFile):
Returns:
int: Number of frames in file.
"""
return super().frames_in_file()
return super().frames_in_file
def __enter__(self):
return self

View File

@ -47,8 +47,8 @@ void define_file_io_bindings(py::module &m) {
})
.def("seek", &CtbRawFile::seek)
.def("tell", &CtbRawFile::tell)
.def("image_size_in_bytes", &CtbRawFile::image_size_in_bytes)
.def("frames_in_file", &CtbRawFile::frames_in_file);
.def_property_readonly("image_size_in_bytes", &CtbRawFile::image_size_in_bytes)
.def_property_readonly("frames_in_file", &CtbRawFile::frames_in_file);
py::class_<File>(m, "File")
.def(py::init([](const std::filesystem::path &fname) {