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):
356356 __entry_signal = (0 ,)
357357 __exit_signal = (False ,)
358358
359- __pdoc__ ['SignalStrategy.__init__' ] = False
360-
361359 def set_signal (self , entry_size : Sequence [float ],
362360 exit_portion : Sequence [float ] = None ,
363361 * ,
@@ -420,8 +418,6 @@ class TrailingStrategy(Strategy):
420418 __n_atr = 6.
421419 __atr = None
422420
423- __pdoc__ ['SignalStrategy.__init__' ] = False
424-
425421 def init (self ):
426422 super ().init ()
427423 self .set_atr_periods ()
@@ -454,6 +450,12 @@ def next(self):
454450 self .data .Close [- 1 ] + self .__atr [- 1 ] * self .__n_atr )
455451
456452
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+
457459# NOTE: Don't put anything below this __all__ list
458460
459461__all__ = [getattr (v , '__name__' , k )
You can’t perform that action at this time.
0 commit comments