Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

Added dummy functions to ts3lib.py... Fixes #74 #111

Closed
wants to merge 1 commit into from

Conversation

Bluscream
Copy link
Contributor

@Bluscream Bluscream commented Dec 11, 2018

... for autocompletion in certain IDEs like PyCharm, Notepad++, Atom, SublimeText

Taken from https://github.com/Bluscream/pyTSon_plugins/blob/master/include/ts3lib.py
Commit: Bluscream/pyTSon_plugins@562a431#diff-d2192dce120874f15c80b895c890f7aa

... for autocompletion in certain IDEs like PyCharm, Notepad++, Atom, SublimeText

Taken from https://github.com/Bluscream/pyTSon_plugins/blob/master/include/ts3lib.py
@pathmann
Copy link
Owner

pathmann commented Dec 11, 2018

  1. I don't think you understood what this module is for.
    Functions in this module are meant to overwrite the core plugin sdk C functions, so it's a python wrapper around the exported C functions (ts3lib.py -> _ts3lib C module -> ts3 plugin sdk functions).
    If you leave out the condition (if func not in globals()), the python function won't be used.

  2. I don't see a reason to somehow bloat the code just for the sake of autocompletion in IDEs.

  3. This brings redundancy which I always tried to avoid.

So to achieve your goal in a clean way, the approach should be to create a new template (https://github.com/pathmann/pyTSon/blob/master/templates/ts3lib.cpp.tpl could be a good starting point) to generate the docstrings to a file which could live in the ressources directory (or somewhere else maybe) to be used as include module in your IDE.

@pathmann pathmann closed this Dec 11, 2018
@Bluscream
Copy link
Contributor Author

The thing is that the IDE will only use autocomplete for the module i need it for. So if i type ts3lib. i need the autocomplete but if the module is named ts3funcs for example it will not autocomplete ts3lib and be useless.

@pathmann
Copy link
Owner

So? Name it ts3lib.py, while developing add the path to sys.path and you should good to go.

@Bluscream
Copy link
Contributor Author

Good idea thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants