For this FINAL HACKTOBERFEST SUBMISSION, I decided to create docstrings for a file. While it sounded simple enough, I encountered certain issues with submitting the file because they wanted a specific format for it, and I needed to ensure it was on par with all the other documents.
It was quite a list that I needed to fix, to sum it up:
Function | Line | Coverage |
---|---|---|
InvalidFileError (L32) | 32 | COVERED |
VersionScanner (L36) | 36 | COVERED |
VersionScanner.load_checkers (L78) | 78 | COVERED |
VersionScanner.available_checkers (L89) | 89 | MISSED |
VersionScanner.remove_skiplist (L96) | 96 | MISSED |
VersionScanner.print_checkers (L107) | 107 | MISSED |
VersionScanner.number_of_checkers (L110) | 110 | MISSED |
VersionScanner.available_language_checkers (L117) | 117 | COVERED |
VersionScanner.print_language_checkers (L130) | 130 | MISSED |
VersionScanner.number_of_language_checkers (L133) | 133 | MISSED |
VersionScanner.is_executable (L136) | 136 | COVERED |
VersionScanner.is_linux_kernel (L174) | 174 | COVERED |
VersionScanner.scan_file (L196) | 196 | COVERED |
VersionScanner.run_checkers (L234) | 234 | MISSED |
VersionScanner.clean_file_path (L272) | 272 | COVERED |
VersionScanner.scan_and_or_extract_file (L284) | 284 | COVERED |
VersionScanner.recursive_scan (L303) | 303 | MISSED |
Everything that is missing is something I need to create a docstring. At this stage, all I know is commenting, and I have no clue what a docstring is. I thought that it was somehow related to a comment, but then again, comments are for unstructured and only for providing slight information. A docstring, on the other hand, provides a more detailed approach to what it is.
I was able to fix it, but they wanted me to use Python Black to format it and to pass a series of tests of seven types of verification. Ultimately, I was able to fix it and finish it properly.
In the end, the experience taught me the importance of clear and comprehensive documentation in software development.
Top comments (0)