This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
Conventions
Niket Shah edited this page Nov 20, 2017
·
3 revisions
We follow PEP8 convention quite strictly however we do make a few exceptions to this rule. They are as follows:
PEP8 specifies that the maximum line length is to be limited to 79 characters with some lines even shorter than this. We replace this rule and try to stick to 90 characters.
The internet seems be divided and PEP8 had some major changes when it comes to this rule. We have agreed that we want to strictly use binary operators on the next line, as opposed to before the line break.
The indentation should be kept consistent by the use of parenthesis appropriately. Example:
if (cell.location != always_empty_location
and random.random() < self.settings['OBSTACLE_RATIO']):