Decorator to handle the deprecation of data_loader from 0.7 :param fn: User defined data loader function :return: A wrapper for the data_loader function
(fn)
| 6 | |
| 7 | |
| 8 | def data_loader(fn): |
| 9 | """ |
| 10 | Decorator to handle the deprecation of data_loader from 0.7 |
| 11 | :param fn: User defined data loader function |
| 12 | :return: A wrapper for the data_loader function |
| 13 | """ |
| 14 | |
| 15 | def func_wrapper(self): |
| 16 | try: # Works for version 0.6.0 |
| 17 | return pl.data_loader(fn)(self) |
| 18 | |
| 19 | except: # Works for version > 0.6.0 |
| 20 | return fn(self) |
| 21 | |
| 22 | return func_wrapper |
nothing calls this directly
no outgoing calls
no test coverage detected