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

Add lint of python files in CI #4

Merged
merged 2 commits into from
Mar 10, 2024
Merged

Add lint of python files in CI #4

merged 2 commits into from
Mar 10, 2024

Conversation

nattvara
Copy link
Owner

@nattvara nattvara commented Mar 9, 2024

Description

Add linting of python files in the CI

Motivation and Context

Ensure the files are neat and tidy.

What will this PR change

  • Add a lint step in the CI
  • Fix the lint errors

Notes

The lint issues

./db/custom_fields/__init__.py:1:1: F401 '.arrow_datetime_field.ArrowDateTimeField' imported but unused
./db/custom_fields/__init__.py:2:1: F401 '.model_params.ModelParamsField' imported but unused
./db/custom_fields/__init__.py:3:1: F401 '.model_name.ModelNameField' imported but unused
./db/migrations/001_add_prompt_handles_table.py:9:5: F401 'playhouse.postgres_ext as pw_pext' imported but unused
./db/models/__init__.py:1:1: F401 '.base_model.BaseModel' imported but unused
./db/models/prompt_handle.py:11:121: E501 line too long (158 > 120 characters)
./http_api/websocket_protocols/llm_streams.py:97:121: E501 line too long (121 > 120 characters)
./llms/generate.py:14:121: E501 line too long (134 > 120 characters)
./llms/generate.py:93:121: E501 line too long (129 > 120 characters)
./llms/sampling_strategies.py:6:121: E501 line too long (129 > 120 characters)
./llms/sampling_strategies.py:7:121: E501 line too long (129 > 120 characters)
./services/llm/worker.py:58:29: F541 f-string is missing placeholders
./services/llm/worker.py:79:27: F541 f-string is missing placeholders
./services/llm/worker.py:81:21: F541 f-string is missing placeholders
./tests/conftest.py:16:1: E402 module level import not at top of file
./tests/conftest.py:17:1: E402 module level import not at top of file
./tests/conftest.py:18:1: E402 module level import not at top of file
./tests/conftest.py:19:1: E402 module level import not at top of file
./tests/conftest.py:80:121: E501 line too long (129 > 120 characters)
./tests/services/llm/llm_test.py:140:52: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./tests/services/llm/llm_test.py:142:52: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./tests/services/llm/llm_test.py:148:1: F811 redefinition of unused 'test_model_params_can_be_specified' from line 119
./tests/services/llm/worker_test.py:32:121: E501 line too long (133 > 120 characters)
./tests/services/llm/worker_test.py:40:121: E501 line too long (122 > 120 characters)
./tests/services/llm/worker_test.py:89:121: E501 line too long (136 > 120 characters)
./tests/services/llm/worker_test.py:128:121: E501 line too long (139 > 120 characters)
./tests/services/llm/worker_test.py:145:121: E501 line too long (125 > 120 characters)
4     E402 module level import not at top of file
12    E501 line too long (158 > 120 characters)
2     E712 comparison to False should be 'if cond is False:' or 'if not cond:'
5     F401 '.arrow_datetime_field.ArrowDateTimeField' imported but unused
3     F541 f-string is missing placeholders
1     F811 redefinition of unused 'test_model_params_can_be_specified' from line 119
27

@nattvara nattvara merged commit ebe1949 into main Mar 10, 2024
2 checks passed
@nattvara nattvara deleted the feature/add-linting-in-ci branch March 10, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant