You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pya/pya/pyaModule.cc
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -426,15 +426,23 @@ class PythonClassGenerator
426
426
doc += "\n\n";
427
427
}
428
428
doc += (*m)->doc ();
429
-
mp_module->add_python_doc (*m, tl::sprintf (tl::to_string (tr ("The object exposes a readable attribute '%s'. This is the getter")), name));
429
+
if (! is_static) {
430
+
mp_module->add_python_doc (*m, tl::sprintf (tl::to_string (tr ("The object exposes a readable attribute '%s'. This is the getter")), name));
431
+
} else {
432
+
mp_module->add_python_doc (*m, tl::sprintf (tl::to_string (tr ("The class exposes a readable attribute '%s'. This is the getter")), name));
433
+
}
430
434
}
431
435
432
436
for (MethodTableEntry::method_iterator m = begin_setters; m != end_setters; ++m) {
433
437
if (! doc.empty ()) {
434
438
doc += "\n\n";
435
439
}
436
440
doc += (*m)->doc ();
437
-
mp_module->add_python_doc (*m, tl::sprintf (tl::to_string (tr ("The object exposes a writable attribute '%s'. This is the setter")), name));
441
+
if (! is_static) {
442
+
mp_module->add_python_doc (*m, tl::sprintf (tl::to_string (tr ("The object exposes a writable attribute '%s'. This is the setter")), name));
443
+
} else {
444
+
mp_module->add_python_doc (*m, tl::sprintf (tl::to_string (tr ("The class exposes a writable attribute '%s'. This setter may not be available in Python")), name));
0 commit comments