Commit graph

14 commits

Author SHA1 Message Date
Jakub Trllo
aa9dbf612e
Chore: Event callbacks can have order (#6080)
* EventCallback object have order

* callbacks are processed by the callback order

* safer approach to get function information

* modified docstring a little

* added tests for ordered calbacks

* fix python 2 support

* added support for partial methods

* removed unused '_get_func_info'

* formatting fix

* change test functions docstring

* added test for removement of source function when partial is used

* Allow order 'None'

* implemented 'weakref_partial'  to allow partial callbacks

* minor tweaks

* added support to pass additional arguments to 'wearkref_partial'

* modify docstring

* added 'weakref_partial' to tests

* move public method before prive methods

* added required order back but use '100' as default order

* fix typo

Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>

---------

Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
2024-01-04 10:51:18 +01:00
Jakub Trllo
1f6df907eb fixed typehints 2023-09-01 16:54:05 +02:00
Jakub Trllo
248336bb0d
General: Lib code cleanup (#5003)
* implemented 'is_func_signature_supported' function

* 'WeakMethod' can be imported from 'python_2_comp' all the time

* simplified events logic for callback registration

* modified docstrings in publish lib

* removed unused imports

* fixed 'run_openpype_process' docstring
2023-05-24 10:51:35 +02:00
Fabia Serra Arrizabalaga
c41a3b1cb8 Pass module name and set __file__ on module to avoid AttributeErrors saying module has no __file__ attribute 2023-02-22 17:21:37 +01:00
Jakub Trllo
89d61723de applied comments 2022-03-23 19:20:37 +01:00
Jakub Trllo
239f70a8f7 added better check of classes and subclasses 2022-03-23 14:51:04 +01:00
iLLiCiTiT
3f5b041619 update docstring 2022-01-06 15:17:18 +01:00
iLLiCiTiT
abc39a9e9f make sure output is always the same 2022-01-06 15:17:02 +01:00
iLLiCiTiT
e6d76c5b58 fix python 2 unicode conversion 2021-11-11 14:17:09 +01:00
iLLiCiTiT
da4e4e7501 added docstrings 2021-07-28 15:23:14 +02:00
iLLiCiTiT
05c6e450f5 slighlty modified import function 2021-07-28 15:09:59 +02:00
iLLiCiTiT
4a5f015f4f renamed function 'load_module_from_dirpath' to 'import_module_from_dirpath' 2021-07-28 14:57:04 +02:00
iLLiCiTiT
4ca5ef46b5 adde new lib import functions 2021-07-27 20:10:41 +02:00
Milan Kolar
8432e94615 rename folder 2021-04-01 18:54:46 +02:00
Renamed from pype/lib/python_module_tools.py (Browse further)