Manual:Pywikibot/Development/Guidelines

this is a page for helping new people who wants to help and improve pywikibot

Reporting a bug
you have seen a probelm in pywikibot? it's not the end of the world, just keep calm and report it in bugzilla, the important notes for reporting bugs are:
 * Get output of  and amend it to your report
 * Include exact steps to reproduce the bug
 * Include the difference between expected output and real output

Bug triage
If you like to help pywikibot is not just writing codes! you can help easily by categorizing, confirming, priortizing bugs. Just go to the browse project in bugzilla and get the list.

Follow pep8
These are some standards for writing codes - pep8 is mainly about writing your codes in a way that would be easy to read. Some of the most important things are:
 * Add a space before and after an equal sign ("=") when you want to define a variable
 * Don't make very long lines, split them into several lines based on what they are
 * Identation are really important about readablity of code, use it properly, use 4 spaces instead of tab character

Documentation
Don't forget to update the documentation both in mediawiki.org and in the codes.

for adding the documentation you need to add it at the top of the class or file you're working on it as an example:

Test via pyflakes
pyflakes is a tool to check correct usage of variables in codes - for example if you define a variable and dont' use it (or don't define a variable and use it) it returns an error for you.

You can easily install and run the check, there is a manual for it

Miscellany

 * Use "bot" instead of "robot" in naming variables, documentation, etc.
 * Don't use tab character, use 4 spaces instead