Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
efedfcd
Initial commit
anishmanandhar May 18, 2020
7dd0fba
setup docusaurus for documentation
anishmanandhar May 18, 2020
ff6e845
upgrqade docusaurus from v1 to v2
anishmanandhar May 20, 2020
dafe37e
python naming conventions files
sagarlf May 20, 2020
dc0ef86
sidebar category for naming conventions
sagarlf May 20, 2020
4e0f18a
docusaurus v2 test and run
sagarlf May 21, 2020
0412fab
exception names
sagarlf May 21, 2020
d55a5fa
variable naming of loops and contexts
sagarlf May 21, 2020
b5c6917
added other general conventions and templates
sagarlf May 25, 2020
cc192f6
join and concatenation in standard
sagarlf May 26, 2020
538d719
spell check and some references added
sagarlf May 26, 2020
7a4d433
tools and readings
sagarlf May 26, 2020
e72ce43
added tox to tools
sagarlf May 26, 2020
4491f69
be explicit about alternative tools
sagarlf May 26, 2020
64740ce
added mypy, isort and other tools and references
sagarlf May 26, 2020
16e0205
added python packaging
sagarlf May 26, 2020
3dbf21d
some PR review changes
sagarlf May 26, 2020
abd31d0
remove requirements.txt and set links to open in blank target
sagarlf May 26, 2020
e5a7afd
some clarity in sqlalchemy DB abstraction
sagarlf May 26, 2020
4a9e76a
general guidelines update
sagarlf May 27, 2020
bd6f5c9
type safety recommended
sagarlf May 27, 2020
d54bc4a
logging and exceptions separated from general
sagarlf May 28, 2020
4960104
reduncdancy removed in language
sagarlf May 28, 2020
d2ab44a
some additions to convention
sagarlf May 28, 2020
66e8678
python: Documentation on docstrings was added
sawanvaidya Jun 1, 2020
e3a305f
python: Google Docstring made recommended, added interrogate
sawanvaidya Jun 2, 2020
415d053
removed target flag and wanted to try extlink plugin along with testi…
sagarlf Jun 1, 2020
54f91b6
restructured links sort for convention
sagarlf Jun 8, 2020
09a1554
sidebar management in some order
sagarlf Jun 8, 2020
3e4468c
cleanups and example additions along with doctests
sagarlf Jun 15, 2020
0bd2fc6
pydocstyle linter typo and test doc addition
sagarlf Jun 18, 2020
75745e8
typo in development environment recommendation
sagarlf Jun 18, 2020
6194de2
some typo cleanup
sagarlf Jun 18, 2020
7d6ad53
some additional tip addition
sagarlf Jun 18, 2020
e49e04f
some project structure clarity and additional templates
sagarlf Jun 23, 2020
ba5a367
added __init__ and __main__
sagarlf Jun 23, 2020
b029bdf
template generation header
sagarlf Jun 23, 2020
dc8125e
change github link in docusaurus configuration
anishmanandhar Jun 26, 2020
59ebec2
merged with develop
sagarlf Jun 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions docs/python/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ sidebar_label: Classes

* Avoid inbuilt names.
* Classes names should always be `PascalCase`. i.e. `MyClass`
* Even if you are building datatypes based on inbuilt class use PascalCase. i.e. `MyDict(dict):`
* Describe the class resposibility in name.
* **Abstract Classes and Mixins**
+ Use [abstract containers](https://docs.python.org/3/library/collections.abc.html#module-collections.abc) if need to override datatypes.
- If you must build datatypes based on inbuilt class use PascalCase. i.e. `MyDict(dict):`.
+ Use [`abc`](https://docs.python.org/3/library/abc.html) if you need pure OOP style abstract classes. Use `NotImplementedError` exceptions with overrides.
+ mixin should be named with `Mixin` suffix such as `class LoginRequiredMixin` which can be used in multiple inheritance.
* Describe the class responsibility in name.
* Custom Exceptions should always be named ending with `Error` i.e. `MyCustomError`

##### Example

```python
class HelloWorld:
pass

class HelloWorldError(Exception):
pass
```
Loading