Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dealing with "docstrings" and "code formatting" #39

Open
hrushikesh-s opened this issue Sep 14, 2023 · 0 comments
Open

dealing with "docstrings" and "code formatting" #39

hrushikesh-s opened this issue Sep 14, 2023 · 0 comments
Labels
coding standards implement good coding practice

Comments

@hrushikesh-s
Copy link
Member

These are some of the unique formatting and docstring errors that I get when I try to add the ruff linter support to alab_management package. We can safely ignore them as of now since they probably wouldn't affect the working of the code, but we should look into it to ensure that the code becomes even more readable.

@idocx, what are your thoughts on this?

It appears to me that adding docstrings and getting the formatting as per the standard PEP guidelines should be a straightforward task, given the fact that we have tools like Github Copilot readily available. I can work on this PR if you are fine with adding docstrings to classes, methods, and functions, and formatting the code as per the PEP guidelines.

alab_management/device_view/device_view.py:67:13: E722 Do not use bare `except`
alab_management/device_view/device_view.py:68:17: B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
alab_management/device_view/device_view.py:76:13: E722 Do not use bare `except`
alab_management/device_view/device_view.py:77:17: B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
alab_management/task_manager/task_manager.py:34:5: F811 Redefinition of unused `RequestStatus` from line 31
alab_management/task_manager/task_manager.py:89:25: PLW2901 `for` loop variable `position` overwritten by assignment target
alab_management/task_manager/task_manager.py:194:9: D401 First line of docstring should be in imperative mood: "Checking if there are any tasks that are ready to be submitted. (STATUS = READY)"
alab_management/task_manager/task_manager.py:254:9: D205 1 blank line required between summary line and description
alab_management/task_manager/task_manager.py:498:89: E501 Line too long (150 > 88 characters)
docs/source/conf.py:33:1: E402 Module level import not at top of file
docs/source/conf.py:99:5: D103 Missing docstring in public function
examples/simple_example/devices/furnace.py:24:89: E501 Line too long (92 > 88 characters)
examples/simple_example/tasks/moving.py:8:19: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
examples/simple_example/tasks/weighing.py:1:1: D100 Missing docstring in public module
examples/simple_example/tasks/weighing.py:11:7: D101 Missing docstring in public class
examples/simple_example/tasks/weighing.py:16:9: D102 Missing docstring in public method
tests/fake_lab/tasks/heating.py:20:43: B026 Star-arg unpacking after a keyword argument is strongly discouraged
Found 137 errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coding standards implement good coding practice
Projects
None yet
Development

No branches or pull requests

2 participants