| Conditions | 1 |
| Total Lines | 10 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import re |
||
| 43 | def is_cce_valid(cceid): |
||
| 44 | """ |
||
| 45 | IF CCE ID IS IN VALID FORM (either 'CCE-XXXX-X' or 'CCE-XXXXX-X' |
||
| 46 | where each X is a digit, and the final X is a check-digit) |
||
| 47 | based on Requirement A17: |
||
| 48 | |||
| 49 | http://people.redhat.com/swells/nist-scap-validation/scap-val-requirements-1.2.html |
||
| 50 | """ |
||
| 51 | match = re.match(r'^CCE-\d{4,5}-\d$', cceid) |
||
| 52 | return match is not None |
||
| 53 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.