ISISNeutronMuon / ISISNeutronMuon/MDMC

Reorder properties, magic methods, public and private methods in classes

Open
#202 0 comments 0 reactions 0 assignees View on GitHub
good first issue P1 refactor
Dominant language
Python
Stars
4
Forks
0
Avg merge
2d 4h
Merged PRs (30d)
5

Description

**Is your feature request related to a problem? Please describe.**
Ordering of properties, magic methods, public and private methods is not standardised.

**Describe the solution you'd like**
New standard for structuring a class is as follows:
1. ```__new__```
2. ```__init__```
3. Other magic methods (__)
4. Properties
5. Public methods
6. Private methods
This order is because magic methods, properties and public methods make up the interface of the class. Properties must precede public methods so that Sphinx creates them directly after Attributes.

**Classes which require refactoring:**
common.units:
- UnitFloat
- UnitNDArray

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.