mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-25 20:33:35 +00:00
4252d46844
* Add capabilities to RaCtlCmds.get_device_types() to return the image file support boolean, and list of supported block sizes. * Inquire rascsi backend about the min block size rather than hard coding values in the web UI. * Add class methods for getting lists of certain device types. * Use the new class methods to get lists of device types in the web ui. * Make use of the new class methods in the oled script. * Remove now unused constants, and simplify logic in common_settings * Improve device name mapping to extend the existing dictionary rather than creating a new data structure. * Use jinja2 sort filters instead of sorting in python code. Removing redundant variables. * Introduce the get_device_name() utility method which returns the translated name for a device acronym. Use the new method to display device name when attaching devices. * Fix typo * Rename Support Device to Periperal Device. General tweaks to UI strings. * Tweak UI string. * Fix error. |
||
---|---|---|
.. | ||
common | ||
loopback_test | ||
oled | ||
web | ||
__init__.py | ||
.pylintrc | ||
README.md |
RaSCSI Python Apps
This directory contains Python-based clients for RaSCSI as well as common packages that are shared among the clients.
The following paragraphs in this README contain instructions that are shared among all Python apps.
Static analysis with pylint
It is recommended to run pylint against new code to protect against bugs and keep the code readable and maintainable. The local pylint configuration lives in .pylintrc. In order for pylint to recognize venv libraries, the pylint-venv package is required.
sudo apt install pylint3
sudo pip install pylint-venv
source venv/bin/activate
pylint3 python_source_file.py
Examples:
# check a single file
pylint web/src/web.py
# check the python modules
pylint common/src
pylint web/src
pylint oled/src