IBM / python-sdk-core

The python-sdk-core repository contains core functionality required by Python code generated by the IBM OpenAPI SDK Generator.
Apache License 2.0
20 stars 27 forks source link

Fix linting for Python3 and fix all lint issues #40

Closed mkistler closed 5 years ago

mkistler commented 5 years ago

This PR fixes the linting script so that it will run with Python3 -- now the only version supported by the core. To make the set of changes manageable, I disabled a few of the less serious lint rules. Most of the changes were to conform to these linting rules:

I also took this opportunity to add external methods for convert_model, convert_list, and encode_path_vars. so that users of the core can use these methods rather than the corresponding methods that start with "_".

codecov[bot] commented 5 years ago

Codecov Report

Merging #40 into master will increase coverage by 0.08%. The diff coverage is 98.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
+ Coverage   97.41%   97.49%   +0.08%     
==========================================
  Files          17       17              
  Lines         541      559      +18     
==========================================
+ Hits          527      545      +18     
  Misses         14       14
Impacted Files Coverage Δ
ibm_cloud_sdk_core/iam_token_manager.py 100% <ø> (ø) :arrow_up:
ibm_cloud_sdk_core/cp4d_token_manager.py 100% <ø> (ø) :arrow_up:
ibm_cloud_sdk_core/utils.py 97.82% <100%> (+0.35%) :arrow_up:
...oud_sdk_core/authenticators/basic_authenticator.py 100% <100%> (ø) :arrow_up:
ibm_cloud_sdk_core/get_authenticator.py 100% <100%> (ø) :arrow_up:
...loud_sdk_core/authenticators/cp4d_authenticator.py 100% <100%> (ø) :arrow_up:
..._core/authenticators/bearer_token_authenticator.py 100% <100%> (ø) :arrow_up:
ibm_cloud_sdk_core/api_exception.py 100% <100%> (ø) :arrow_up:
ibm_cloud_sdk_core/jwt_token_manager.py 100% <100%> (+2.08%) :arrow_up:
ibm_cloud_sdk_core/detailed_response.py 100% <100%> (ø) :arrow_up:
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 57e1aa2...25072a1. Read the comment docs.

mkistler commented 5 years ago

I will fix the coverage so that the PR checks pass. We should probably add pylint to PR checks as well.

mkistler commented 5 years ago

@mgrattray I decided to back off on raising the ValueError until the next major release, just for safety.

padamstx commented 5 years ago

:tada: This PR is included in version 1.1.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: