Skip to content

Fix some pylint warnings #334

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

Merged
merged 1 commit into from
Dec 20, 2019

Conversation

dgreen-arm
Copy link
Contributor

This PR fixes a few warnings that the check_python_files component of all.sh was complaining about

Copy link
Collaborator

@gilles-peskine-arm gilles-peskine-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok but could use some improvement

@@ -26,6 +26,8 @@
import sys

class Results:
"""Stores file and line information about errors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: PEP 257 says to write ”Store …“, not “Stores …”, and to end with a period. PEP 257 also says a one-line docstring “should really fit on one line”, and a multi-line docstring should start with a one-line summary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated this.

@@ -41,6 +42,7 @@ def warning(self, file_name, line_number, fmt, *args):
self.warnings += 1

def collect_test_directories():
"""Gets the relative path for the TLS and Crypto test directories."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get

@@ -55,6 +57,7 @@ def collect_test_directories():
return directories

def check_description(results, seen, file_name, line_number, description):
"""Checks test case descriptions for errors."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check

Add docstrings where they were missing and fix a too-long line
@Patater
Copy link
Contributor

Patater commented Dec 20, 2019

Mbed OS tests expected to be failing until ARMmbed/mbed-os#12150 is merged

@Patater Patater merged commit 448d1cc into ARMmbed:development Dec 20, 2019
gilles-peskine-arm added a commit to gilles-peskine-arm/mbed-crypto that referenced this pull request Feb 3, 2020
Previously in d875285:
* ARMmbed#333: Streamline PSA key type encodings: prepare
* ARMmbed#323: Initialise return values to an error

Previously in dbcb442:
* ARMmbed#291: Test MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
* ARMmbed#334: Fix some pylint warnings

Previously in ceceedb:
* ARMmbed#348: Bump version to Mbed TLS 2.20.0 and crypto SO version to 4
* ARMmbed#354: Fix incrementing pointer instead of value

In this commit:
* ARMmbed#349: Fix minor defects found by Coverity
* ARMmbed#179: Add option to build SHA-512 without SHA-384
* ARMmbed#327: Implement psa_hash_compute and psa_hash_compare
* ARMmbed#330: Streamline PSA key type and curve encodings
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.

3 participants