File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -356,8 +356,6 @@ def init(self):
356
356
__entry_signal = (0 ,)
357
357
__exit_signal = (False ,)
358
358
359
- __pdoc__ ['SignalStrategy.__init__' ] = False
360
-
361
359
def set_signal (self , entry_size : Sequence [float ],
362
360
exit_portion : Sequence [float ] = None ,
363
361
* ,
@@ -420,8 +418,6 @@ class TrailingStrategy(Strategy):
420
418
__n_atr = 6.
421
419
__atr = None
422
420
423
- __pdoc__ ['SignalStrategy.__init__' ] = False
424
-
425
421
def init (self ):
426
422
super ().init ()
427
423
self .set_atr_periods ()
@@ -454,6 +450,12 @@ def next(self):
454
450
self .data .Close [- 1 ] + self .__atr [- 1 ] * self .__n_atr )
455
451
456
452
453
+ # Prevent pdoc3 documenting __init__ signature of Strategy subclasses
454
+ for cls in list (globals ().values ()):
455
+ if isinstance (cls , type ) and issubclass (cls , Strategy ):
456
+ __pdoc__ [f'{ cls .__name__ } .__init__' ] = False
457
+
458
+
457
459
# NOTE: Don't put anything below this __all__ list
458
460
459
461
__all__ = [getattr (v , '__name__' , k )
You can’t perform that action at this time.
0 commit comments