PySAMP
PySAMP copied to clipboard
Minor code edit
(!) The names and arguments of some functions have been changed.
The code is given in a single "standard":
- camelCase variables --> snake_case ;
- text_draw, paint_job, text_label, game_text --> textdraw, paintjob, textlabel, gametext ;
- example_1_variable, color_1... --> example1_variable, color1... ;
- playerid, modelid, actorid... --> player_id, model_id, actor_id... ;
- Added default values for some functions (vehicle colors = 0, vehicle/actor spawn angle = 0, etc.).
And more.
Hi again : https://github.com/pysamp/PySAMP/pull/99/commits/949166837592512f117b251ca1020c7720d16a4a#diff-fdd6d9bd391be82a048c2bf8118dfd479302fb73017aa3f359abb60235ca612cR1980
Here I think the argument name is misleading. It is a boolean argument and the argument name could indicate its a list of names.. Wouldn't it be better to keep the legacy naming on these functions as they are directly wrapping the pawn natives? 😊 The same goes to the other function wrappers that take booleans.
For example here we need to be super careful with argument naming, as a "true" value here: https://github.com/pysamp/PySAMP/pull/99/commits/949166837592512f117b251ca1020c7720d16a4a#diff-172ce6dd858ee66b6f2a93357f8347a1983fb80fe00eb778510ed08b1e85e60fR219 will disable. Without the correct argument name, its hard to know what the boolean does. Otherwise we need to explicitly state it in docstring (for visibility) :)
Also these removed newlines will break the sphinx documentation, so please revert these changes done with newline removals before and after tables, notes and macros where this is done https://github.com/pysamp/PySAMP/commit/949166837592512f117b251ca1020c7720d16a4a#diff-f9c6d43524893ca43d296c52a6ec7948b387a05f56f13a2adba62b0e425fef68L204
You can test documentation generation locally by installing the requirements.txt modules, and then enter pysamp/docs
and run make html
In order to check the result you can run a local webserver and enter the generated HTML files locally inside the docs folder 👍
Also these removed newlines will break the sphinx documentation, so please revert these changes done with newline removals before and after tables, notes and macros where this is done 9491668#diff-f9c6d43524893ca43d296c52a6ec7948b387a05f56f13a2adba62b0e425fef68L204
You can test documentation generation locally by installing the requirements.txt modules, and then enter
pysamp/docs
and runmake html
In order to check the result you can run a local webserver and enter the generated HTML files locally inside the docs folder 👍
This happened due to copying from Github, I didn't notice)
Most of these are great, thanks! Some of these I'm not sure I agree with, eg. the ones that revert changes to argument names that we purposefully made more explicit ; but more generally, can you please rebase this onto main since @Ykpauneu fixed some of these already? Thanks :-D