Skip to content

Commit

Permalink
Lint with new Makefile target via autopop8 & autoflake
Browse files Browse the repository at this point in the history
  • Loading branch information
BluThaitanium committed Jul 20, 2022
1 parent 084208d commit 7659afe
Show file tree
Hide file tree
Showing 231 changed files with 6,598 additions and 9,479 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,15 @@ lint_javascript: ## Check Javascript code style compliance
.PHONY: lint
lint: lint_javascript lint_python ## Check for code style violations (JavaScript, Python)
@echo "$@: OK"

.PHONY: format_python
format_python:
@which autoflake > /dev/null || pip install autoflake
@which autopep8 > /dev/null || pip install autopep8
@autoflake api tools/python -i --recursive --remove-all-unused-imports \
--ignore-init-module-imports --remove-unused-variables
@autopep8 api/ tools/python/ -i --recursive -a -a -a --experimental \
--select=E9,E2,E3,E5,F63,F7,F82,F4,F841,W291 \
--exclude .git,__pycache__,docs/source/conf.py,old,build,dist,venv \
--max-line-length=140
@echo "$@: OK"
11 changes: 8 additions & 3 deletions api/client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["certifi>=2017.4.17", "python-dateutil>=2.1", "six>=1.10", "urllib3>=1.23"]

REQUIRES = [
"certifi>=2017.4.17",
"python-dateutil>=2.1",
"six>=1.10",
"urllib3>=1.23"
]


setup(
name=NAME,
Expand All @@ -42,5 +47,5 @@
include_package_data=True,
long_description="""\
Machine Learning Exchange API Client
""",
"""
)
27 changes: 7 additions & 20 deletions api/client/swagger_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
# import ApiClient
from swagger_client.api_client import ApiClient
from swagger_client.configuration import Configuration

# import models into sdk package
from swagger_client.models.any_value import AnyValue
from swagger_client.models.api_access_token import ApiAccessToken
Expand All @@ -42,25 +41,15 @@
from swagger_client.models.api_catalog_upload_item import ApiCatalogUploadItem
from swagger_client.models.api_credential import ApiCredential
from swagger_client.models.api_generate_code_response import ApiGenerateCodeResponse
from swagger_client.models.api_generate_model_code_response import ( # noqa: F401
ApiGenerateModelCodeResponse,
)
from swagger_client.models.api_generate_model_code_response import ApiGenerateModelCodeResponse
from swagger_client.models.api_get_template_response import ApiGetTemplateResponse
from swagger_client.models.api_inferenceservice import ApiInferenceservice
from swagger_client.models.api_list_catalog_items_response import ( # noqa: F401
ApiListCatalogItemsResponse,
)
from swagger_client.models.api_list_catalog_upload_errors import ( # noqa: F401
ApiListCatalogUploadErrors,
)
from swagger_client.models.api_list_catalog_items_response import ApiListCatalogItemsResponse
from swagger_client.models.api_list_catalog_upload_errors import ApiListCatalogUploadErrors
from swagger_client.models.api_list_components_response import ApiListComponentsResponse
from swagger_client.models.api_list_credentials_response import ( # noqa: F401
ApiListCredentialsResponse,
)
from swagger_client.models.api_list_credentials_response import ApiListCredentialsResponse
from swagger_client.models.api_list_datasets_response import ApiListDatasetsResponse
from swagger_client.models.api_list_inferenceservices_response import ( # noqa: F401
ApiListInferenceservicesResponse,
)
from swagger_client.models.api_list_inferenceservices_response import ApiListInferenceservicesResponse
from swagger_client.models.api_list_models_response import ApiListModelsResponse
from swagger_client.models.api_list_notebooks_response import ApiListNotebooksResponse
from swagger_client.models.api_list_pipelines_response import ApiListPipelinesResponse
Expand All @@ -71,17 +60,15 @@
from swagger_client.models.api_parameter import ApiParameter
from swagger_client.models.api_pipeline import ApiPipeline
from swagger_client.models.api_pipeline_custom import ApiPipelineCustom
from swagger_client.models.api_pipeline_custom_run_payload import ( # noqa: F401
ApiPipelineCustomRunPayload,
)
from swagger_client.models.api_pipeline_custom_run_payload import ApiPipelineCustomRunPayload
from swagger_client.models.api_pipeline_dag import ApiPipelineDAG
from swagger_client.models.api_pipeline_extension import ApiPipelineExtension
from swagger_client.models.api_pipeline_inputs import ApiPipelineInputs
from swagger_client.models.api_pipeline_task import ApiPipelineTask
from swagger_client.models.api_pipeline_task_arguments import ApiPipelineTaskArguments
from swagger_client.models.api_run_code_response import ApiRunCodeResponse
from swagger_client.models.api_settings import ApiSettings
from swagger_client.models.api_settings_section import ApiSettingsSection # noqa: F401
from swagger_client.models.api_settings_section import ApiSettingsSection
from swagger_client.models.api_status import ApiStatus
from swagger_client.models.api_url import ApiUrl
from swagger_client.models.dictionary import Dictionary
Expand Down
Loading

0 comments on commit 7659afe

Please sign in to comment.