freegs-plasma / freegs

Free boundary Grad-Shafranov solver
http://freegs.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
91 stars 53 forks source link

Small QOL Change: Use abstractmethods in jtor.py and add typehints to said abstract met… #89

Closed allen-adastra closed 1 year ago

allen-adastra commented 1 year ago

…hods

Had a bit of time to kill, reckoned I'd make this small QOL change.

PEP 3119 introduced "abstract base classes (abc)" which provides some good features for base classes such as Profile in jtor.py. Added strict enforcement to the methods Jtor, pprime, ffprime, and fvac which derived classes must implement.