Skip to content

Commit 4e4488c

Browse files
committed
fixes for failing stubtest
1 parent 74c4f37 commit 4e4488c

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎Changelog‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
version 1.7.2 (not yet released)
22
===============================
33
* add static type hints (PR #1302)
4+
* Expose nc_rc_set, nc_rc_get (via rc_set, rc_get module functions). (PR #1348)
45

56
version 1.7.1 (tag v1.7.1rel)
67
===============================

‎src/netCDF4/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
'Dataset', 'Variable', 'Dimension', 'Group', 'MFDataset', 'MFTime', 'CompoundType',
1717
'VLType', 'date2num', 'num2date', 'date2index', 'stringtochar', 'chartostring',
1818
'stringtoarr', 'getlibversion', 'EnumType', 'get_chunk_cache', 'set_chunk_cache',
19-
'set_alignment', 'get_alignment', 'nc_get', 'nc_set',
19+
'set_alignment', 'get_alignment', 'rc_get', 'rc_set',
2020
]
2121
__pdoc__ = {'utils': False}
2222
# if HDF5_PLUGIN_PATH not set, point to package path if plugins live there

‎src/netCDF4/__init__.pyi‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ __all__ = [
1414
'Dataset', 'Variable', 'Dimension', 'Group', 'MFDataset', 'MFTime', 'CompoundType',
1515
'VLType', 'date2num', 'num2date', 'date2index', 'stringtochar', 'chartostring',
1616
'stringtoarr', 'getlibversion', 'EnumType', 'get_chunk_cache', 'set_chunk_cache',
17-
'set_alignment', 'get_alignment', 'nc_get', 'nc_set',
17+
'set_alignment', 'get_alignment', 'rc_get', 'rc_set',
1818
]
1919
__pdoc__ = {'utils': False}
2020

@@ -625,8 +625,8 @@ def chartostring(
625625
) -> npt.NDArray[np.str_] | npt.NDArray[np.bytes_]: ...
626626

627627
def getlibversion() -> str: ...
628-
def nc_get(key: str) -> str: ...
629-
def nc_set(key: str, val: str): ...
628+
def rc_get(key: str) -> str: ...
629+
def rc_set(key: str, val: str)-> None: ...
630630

631631
def set_alignment(threshold: int, alignment: int): ...
632632
def get_alignment() -> tuple[int, int]: ...

‎src/netCDF4/_netCDF4.pyi‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ from . import (
66
stringtoarr, getlibversion, EnumType, get_chunk_cache, set_chunk_cache,
77
set_alignment, get_alignment, default_fillvals, default_encoding,
88
NetCDF4MissingFeatureException, is_native_big, is_native_little, unicode_error,
9+
rc_get, rc_set,
910
__version__, __netcdf4libversion__, __hdf5libversion__, __has_rename_grp__,
1011
__has_nc_inq_path__, __has_nc_inq_format_extended__, __has_nc_open_mem__,
1112
__has_nc_create_mem__, __has_cdf5_format__, __has_parallel4_support__,
1213
__has_pnetcdf_support__, __has_parallel_support__,
1314
__has_quantization_support__, __has_zstandard_support__,
1415
__has_bzip2_support__, __has_blosc_support__, __has_szip_support__,
15-
__has_set_alignment__, __has_ncfilter__
16+
__has_set_alignment__, __has_ncfilter__, __has_nc_rc_set__,
1617
)
1718

1819

0 commit comments

Comments
 (0)