Skip to content

deserialize_header function needs to be refactored #17

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

Closed
mattsb42-aws opened this issue Sep 27, 2017 · 0 comments
Closed

deserialize_header function needs to be refactored #17

mattsb42-aws opened this issue Sep 27, 2017 · 0 comments
Assignees

Comments

@mattsb42-aws
Copy link
Member

As pylint and flake8 justifiably point out, internal.formatting.deserialize.deserialize_header is too complex. Refactor to simplify.

186590df9307:aws-encryption-sdk-python bullocm$ tox -e flake8,pylint
GLOB sdist-make: /Users/bullocm/git/aws-encryption-sdk-python/setup.py
flake8 inst-nodeps: /Users/bullocm/git/aws-encryption-sdk-python/.tox/dist/aws-encryption-sdk-1.3.2.zip
flake8 installed: asn1crypto==0.23.0,attrs==17.2.0,aws-encryption-sdk==1.3.2,boto3==1.4.7,botocore==1.7.17,cffi==1.11.0,cryptography==2.0.3,docutils==0.14,flake8==3.4.1,flake8-docstrings==1.1.0,flake8-import-order==0.13,flake8-polyfill==1.0.1,idna==2.6,jmespath==0.9.3,mccabe==0.6.1,pycodestyle==2.3.1,pycparser==2.18,pydocstyle==2.0.0,pyflakes==1.5.0,python-dateutil==2.6.1,s3transfer==0.1.11,six==1.11.0,snowballstemmer==1.2.1,wrapt==1.10.11
flake8 runtests: PYTHONHASHSEED='1582386464'
flake8 runtests: commands[0] | flake8 src/aws_encryption_sdk/ setup.py
src/aws_encryption_sdk/internal/formatting/deserialize.py:63:1: C901 'deserialize_header' is too complex (15)
ERROR: InvocationError: '/Users/bullocm/git/aws-encryption-sdk-python/.tox/flake8/bin/flake8 src/aws_encryption_sdk/ setup.py'
pylint inst-nodeps: /Users/bullocm/git/aws-encryption-sdk-python/.tox/dist/aws-encryption-sdk-1.3.2.zip
pylint installed: asn1crypto==0.23.0,astroid==1.5.3,attrs==17.2.0,aws-encryption-sdk==1.3.2,boto3==1.4.7,botocore==1.7.17,cffi==1.11.0,coverage==4.4.1,cryptography==2.0.3,docutils==0.14,idna==2.6,isort==4.2.15,jmespath==0.9.3,lazy-object-proxy==1.3.1,mccabe==0.6.1,mock==2.0.0,pbr==3.1.1,py==1.4.34,pycparser==2.18,pyflakes==1.6.0,pylint==1.7.2,pytest==3.2.2,pytest-catchlog==1.2.2,pytest-cov==2.5.1,pytest-mock==1.6.3,python-dateutil==2.6.1,s3transfer==0.1.11,six==1.11.0,wrapt==1.10.11
pylint runtests: PYTHONHASHSEED='1582386464'
pylint runtests: commands[0] | pylint --rcfile=pylintrc src/aws_encryption_sdk/ setup.py
************* Module aws_encryption_sdk.internal.formatting.deserialize
src/aws_encryption_sdk/internal/formatting/deserialize.py:63: [R0914(too-many-locals), deserialize_header] Too many local variables (27/15)
src/aws_encryption_sdk/internal/formatting/deserialize.py:63: [R0915(too-many-statements), deserialize_header] Too many statements (54/50)

------------------------------------------------------------------
Your code has been rated at 9.99/10 (previous run: 9.99/10, +0.00)

ERROR: InvocationError: '/Users/bullocm/git/aws-encryption-sdk-python/.tox/pylint/bin/pylint --rcfile=pylintrc src/aws_encryption_sdk/ setup.py'
__________________________________________________________________________________________________ summary ___________________________________________________________________________________________________
ERROR:   flake8: commands failed
ERROR:   pylint: commands failed
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

No branches or pull requests

1 participant