Skip to content
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

Google doc strings #3164

Merged
merged 12 commits into from
Apr 19, 2023
Merged

Google doc strings #3164

merged 12 commits into from
Apr 19, 2023

Conversation

helpmefindaname
Copy link
Collaborator

@helpmefindaname helpmefindaname commented Mar 27, 2023

Use flake8-pydocstrings to enforce that existing doc strings follow the google docs format. And fix the format wherever it is not correctly following the google doc string format.

Current todo list:

  • flair/datasets/biomedical.py
  • flair/datasets/document_classification.py
  • flair/datasets/entity_linking.py
  • flair/datasets/sequence_labeling.py

@helpmefindaname helpmefindaname marked this pull request as ready for review April 17, 2023 16:12
Copy link
Collaborator

@alanakbik alanakbik left a comment

Choose a reason for hiding this comment

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

Thanks @helpmefindaname this looks really good!

Lazydocs throws some errors, but mostly in the test classes:

Failed to generate docs for module flair.models.regexp_tagger: AttributeError("module 'flair.models.regexp_tagger' has no attribute '__create_fn__'")

Failed to generate docs for module tests.embeddings.test_document_transform_word_embeddings: TypeError('super(type, obj): obj must be an instance or subtype of type')
Failed to generate docs for module tests.embeddings.test_tfidf_embeddings: TypeError('super(type, obj): obj must be an instance or subtype of type')
Failed to generate docs for module tests.model_test_utils: TypeError('super(type, obj): obj must be an instance or subtype of type')
Failed to generate docs for module tests.models.test_entity_linker: TypeError('super(type, obj): obj must be an instance or subtype of type')
Failed to generate docs for module tests.models.test_relation_classifier: TypeError('super(type, obj): obj must be an instance or subtype of type')
Failed to generate docs for module tests.models.test_relation_extractor: TypeError('super(type, obj): obj must be an instance or subtype of type')
Failed to generate docs for module tests.models.test_sequence_tagger: TypeError('super(type, obj): obj must be an instance or subtype of type')
Failed to generate docs for module tests.models.test_tars_classifier: TypeError('super(type, obj): obj must be an instance or subtype of type')
Failed to generate docs for module tests.models.test_tars_ner: TypeError('super(type, obj): obj must be an instance or subtype of type')
Failed to generate docs for module tests.models.test_text_classifier: TypeError('super(type, obj): obj must be an instance or subtype of type')
Failed to generate docs for module tests.models.test_text_regressor: TypeError('super(type, obj): obj must be an instance or subtype of type')
Failed to generate docs for module tests.models.test_word_tagger: TypeError('super(type, obj): obj must be an instance or subtype of type')
Failed to generate docs for module tests.test_trainer: TypeError('super(type, obj): obj must be an instance or subtype of type')

But I think this is something for a future PR.

@alanakbik alanakbik merged commit bc46396 into master Apr 19, 2023
@alanakbik alanakbik deleted the google-doc-strings branch April 19, 2023 09:16
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.

None yet

2 participants