[libclang/python] Renaming get_version into get_clang_version (#188515)
Rename `get_version` to `get_clang_version` to match the `libclang.so` name[1], and be clear we doesn't return some `cindex.py` internal versioning but the `libclang.so` one. [1] This match was some current API are doing for example `conf.lib.clang_getArraySize` is mapped to `get_array_size`.
This commit is contained in:
parent
f9acb06ce4
commit
add5b811ae
@ -4650,7 +4650,7 @@ class Config:
|
||||
|
||||
return library
|
||||
|
||||
def get_version(self):
|
||||
def get_clang_version(self) -> str:
|
||||
"""
|
||||
Returns the libclang version string used by the bindings
|
||||
"""
|
||||
|
||||
@ -6,6 +6,6 @@ from clang.cindex import Config
|
||||
class TestClangVersion(unittest.TestCase):
|
||||
def test_get_version_format(self):
|
||||
conf = Config()
|
||||
version = conf.get_version()
|
||||
version = conf.get_clang_version()
|
||||
|
||||
self.assertRegex(version, r"^clang version \d+\.\d+\.\d+")
|
||||
|
||||
@ -580,8 +580,8 @@ Python Binding Changes
|
||||
``CodeCompletionResults.results`` should be changed to directly use
|
||||
``CodeCompletionResults``: it nows supports ``__len__`` and ``__getitem__``,
|
||||
so it can be used the same as ``CodeCompletionResults.results``.
|
||||
- Added a new helper method ``get_version`` to the class ``Config`` to read the
|
||||
version string of the libclang in use.
|
||||
- Added a new helper method ``get_clang_version`` to the class ``Config`` to
|
||||
read the version string of the libclang in use.
|
||||
|
||||
OpenMP Support
|
||||
--------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user