Check docstring is valid or not
(docstring: str, loosen_filter: bool = False)
| 760 | |
| 761 | |
| 762 | def check_docstring(docstring: str, loosen_filter: bool = False): |
| 763 | """ |
| 764 | Check docstring is valid or not |
| 765 | """ |
| 766 | check_funcs_mapping = [ |
| 767 | # 'check_docstring_literal', |
| 768 | 'check_docstring_contain_question', |
| 769 | 'check_docstring_underdevelopment', |
| 770 | 'check_docstring_autogenerated', |
| 771 | 'check_docstring_contain_specific_pattern', |
| 772 | 'check_contain_little_alphabet_char', |
| 773 | 'check_contain_many_special_char', |
| 774 | 'check_contain_little_unique_chars', |
| 775 | 'check_contain_little_unique_words', |
| 776 | # 'check_contain_many_special_case', |
| 777 | 'check_contain_too_many_variables', |
| 778 | 'check_contain_too_many_method_call', |
| 779 | # 'check_contain_many_repeated_word', |
| 780 | 'check_contain_many_uppercase_word', |
| 781 | 'check_contain_many_long_word', |
| 782 | 'check_contain_url', |
| 783 | ] |
| 784 | |
| 785 | check_docstring_funcs = [ |
| 786 | # check_docstring_literal, |
| 787 | check_docstring_contain_question, |
| 788 | check_docstring_underdevelopment, |
| 789 | check_docstring_autogenerated, |
| 790 | check_docstring_contain_specific_pattern, |
| 791 | check_contain_little_alphabet_char, |
| 792 | check_contain_many_special_char, |
| 793 | check_contain_little_unique_chars, |
| 794 | check_contain_little_unique_words, |
| 795 | # check_contain_many_special_case, |
| 796 | check_contain_too_many_variables, |
| 797 | check_contain_too_many_method_call, |
| 798 | # check_contain_many_repeated_word, |
| 799 | check_contain_many_uppercase_word, |
| 800 | check_contain_many_long_word, |
| 801 | check_contain_url, |
| 802 | ] |
| 803 | |
| 804 | if loosen_filter: |
| 805 | check_docstring_funcs = [ |
| 806 | check_docstring_contain_question, |
| 807 | check_docstring_underdevelopment, |
| 808 | check_docstring_autogenerated, |
| 809 | check_docstring_contain_specific_pattern, |
| 810 | check_contain_little_alphabet_char, |
| 811 | # check_contain_many_special_char, |
| 812 | check_contain_little_unique_chars, |
| 813 | check_contain_little_unique_words, |
| 814 | # check_contain_many_special_case, |
| 815 | # check_contain_too_many_variables, |
| 816 | # check_contain_too_many_method_call, |
| 817 | # check_contain_many_repeated_word, |
| 818 | check_contain_many_uppercase_word, |
| 819 | check_contain_many_long_word, |