private-attribute-cpp 2.1.11__tar.gz → 2.1.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {private_attribute_cpp-2.1.11/private_attribute_cpp.egg-info → private_attribute_cpp-2.1.12}/PKG-INFO +1 -1
  2. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/private_attribute.cpp +2 -1
  3. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12/private_attribute_cpp.egg-info}/PKG-INFO +1 -1
  4. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/setup.py +1 -1
  5. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/LICENSE +0 -0
  6. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/MANIFEST.in +0 -0
  7. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/README.md +0 -0
  8. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/picosha2.h +0 -0
  9. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/private_attribute.pyi +0 -0
  10. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/private_attribute_cpp.egg-info/SOURCES.txt +0 -0
  11. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/private_attribute_cpp.egg-info/dependency_links.txt +0 -0
  12. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/private_attribute_cpp.egg-info/not-zip-safe +0 -0
  13. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/private_attribute_cpp.egg-info/top_level.txt +0 -0
  14. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/setup.cfg +0 -0
  15. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/tests/test_attr_classify_owner.py +0 -0
  16. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/tests/test_class_private_attrs.py +0 -0
  17. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/tests/test_gc_collect.py +0 -0
  18. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/tests/test_private_abc.py +0 -0
  19. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/tests/test_private_attrs.py +0 -0
  20. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/tests/test_private_func.py +0 -0
  21. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/tests/test_private_inheritance.py +0 -0
  22. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/tests/test_private_method.py +0 -0
  23. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/tests/test_private_wrap.py +0 -0
  24. {private_attribute_cpp-2.1.11 → private_attribute_cpp-2.1.12}/tests/test_slots_cycle.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: private_attribute_cpp
3
- Version: 2.1.11
3
+ Version: 2.1.12
4
4
  Summary: A Python package that provides a way to define private attributes in C++ implementation.
5
5
  Home-page: https://github.com/Locked-chess-official/private_attribute_cpp
6
6
  Author: HuangHaoHua
@@ -2413,10 +2413,11 @@ real_class_name(const std::string& name, const std::string& class_name) noexcept
2413
2413
  {
2414
2414
  size_t start_pos = class_name.find_first_not_of('_');
2415
2415
  std::string cleaned_class_name = (start_pos == std::string::npos) ? "" : class_name.substr(start_pos);
2416
+ std::string pre_underline = cleaned_class_name.size() > 0 ? "_" : "";
2416
2417
 
2417
2418
  // if the name starts with "__" but does not end with "__", change to _ClassName__name
2418
2419
  if (name.length() >= 2 && name.substr(0, 2) == "__" && name.substr(name.length() - 2) != "__") {
2419
- return "_" + cleaned_class_name + name;
2420
+ return pre_underline + cleaned_class_name + name;
2420
2421
  }
2421
2422
  return name;
2422
2423
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: private_attribute_cpp
3
- Version: 2.1.11
3
+ Version: 2.1.12
4
4
  Summary: A Python package that provides a way to define private attributes in C++ implementation.
5
5
  Home-page: https://github.com/Locked-chess-official/private_attribute_cpp
6
6
  Author: HuangHaoHua
@@ -24,7 +24,7 @@ readme = open('README.md').read()
24
24
 
25
25
  setup(
26
26
  name='private_attribute_cpp',
27
- version='2.1.11',
27
+ version='2.1.12',
28
28
  author="HuangHaoHua",
29
29
  author_email="13140752715@example.com",
30
30
  description='A Python package that provides a way to define private attributes in C++ implementation.',