Repository: oppia/oppia

Issue:
Add valid args, returns & raises docstring for the python files.
The aim of this issue is to implement valid docstring in methods (link below) to implement mandatory check for `Args Returns Raises`. Currently most of the files having valid docstrings but some files have missing/invalid format `Args Returns Raises` in their docstring. by solving this we can go ahead and work on #6081 

To be assigned to a file or for any queries, comment on the thread and tag @aks681 .

PR's for reference: #8288 

We have created a list of files which need valid docstring:
- [x] main.py - @Helper2020
- [x] core/domain/story_domain.py @ananthanandanan

Completed:
- [x] utils.py @arnesh07
- [x] core/domain/exp_domain.py - @iamprayush
- [x] core/domain/state_domain.py @abhayraghuwanshi 
- [x] core/controllers/base.py @nishantwrp
- [x] core/domain/prod_validation_jobs_one_off.py @tyleri
- [x] core/domain/story_domain_test.py @nadintamer
- [x] core/jobs_registry.py @ahv15 
- [x] scripts/deploy.py @adrijaacharyya
- [x] scripts/pre_commit_linter.py @KatherineAdair


you can check the docstring issues in this doc: 
https://docs.google.com/document/d/1OiZA4I5ETSDu2K_dYUk2whvdEhV_41exBlPZWdU8cDM/edit?usp=sharing


Discussion:
Hi, please I'm interested in fixing this issue. 
Hi @edeediong, I think you haven't signed the CLA yet, can you please follow the [getting started wiki page](https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#setting-things-up)?  
Assigning `core/domain/exp_domain.py` to @worstahrieu. 
@DubeySandeep thanks let me do that now
Can I be assigned to `core/domain/state_domain.py?` I've signed the CLA
@edeediong Assigned you.. go ahead :) this one is all yours
@DubeySandeep Can you assign me an issue to work on.
@puneeth2001, I've assigned you to `jobs_registry.py`.
Thank you @DubeySandeep will work on it.


Hi!,
i did filled CLA form can i take this up
:-)
Hello! Can I work on this?
@mridullpandey @KatherineAdair Hey guys, let me know which file you want to work with and i'll assign them to you right away!
@Showtim3 Could I be assigned to scripts/pre_commit_linter.py? Thanks! :)
@KatherineAdair ok sure..it's yours.
Hi. I want to take up  scripts/deploy.py
@adrijaacharyya all yours.. :D 
@DubeySandeep Sorry, I won't be able to help with this project for now. Things in life are taking too much of my time currently. Please un-assign me. I hopefully will be able to contribute later on as I started university, which hopefully will let me get better at understanding code, too.
Assigned `core/domain/story_domain_test.py` to @nadintamer per our conversation
Hello, can I work on core/controllers/base.py?
@lorryaze, I've assigned you the file!
Assigned @danigrim to `main.py` per our conversation
@edeediong Hey you wanted the exp_domain.py but it's already taken. So you want to pick another one?


> @DubeySandeep Sorry, I won't be able to help with this project for now. Things in life are taking too much of my time currently. Please un-assign me. I hopefully will be able to contribute later on as I started university, which hopefully will let me get better at understanding code, too.

@Showtim3 the assigned asked to be unassigned, lol.
Hi, can I take the last unclaimed file, `core/domain/prod_validation_jobs_one_off.py`?
Hi @tyleri -- just assigned you. Go for it!
Hello I'm new:). I wanna give this issue a try. I think I can do it! I did sign the  CLA. Thank you
@Helper2020, welcome! Which file would you like to take? I just opened up files that were no longer being worked on, so please look at the description again for the file you would like to do.
@kevinlee12 Sorry I didn't know I had to pick a file. I thought I was going to be assigned one :) How about main.py?
no worries, we typically let contributors decide unless they want us to recommend a particular one for these types of issues. 
can i start working on this please?
@Aaryan-kapur Sure, which file you want to work with? 
@Showtim3 I appreciate it, Thank you so much!, would you be kind enough to suggest me a file.
@Aaryan-kapur Hey I have assigned you ```core/jobs_registry.py```. 

@Showtim3 Thank You!
Hello! I would like to work on docstrings for `utils.py`. @Showtim3  
@Arnesh07 Assigned you..
please check : https://github.com/oppia/oppia/pull/8226


@sauravpratihar 
@Showtim3 

Thank You
Hello! Can I please be assigned to work on core/domain/exp_domain.py?
you got it!
@kevinlee12 I have created a [PR](https://github.com/oppia/oppia/pull/8288) with necassary changes in core/domain/exp_domain.py. PTAL.
thanks, I've assigned @aks681 for the first pass of that PR.
Hi @adrijaacharyya, any updates on deploy.py? Please do let us know if you need help. Thanks!
Hello can I please be assigned to core/domain/story_domain.py.
Sure -- just added you!
I would like to work on core/jobs_registry.py
@ahv15 Hey Harshit, I've assigned you.

Resolving patch:
diff --git a/core/jobs_registry.py b/core/jobs_registry.py
--- a/core/jobs_registry.py
+++ b/core/jobs_registry.py
@@ -216,6 +216,9 @@ class ContinuousComputationEventDispatcher(python_utils.OBJECT):
     def dispatch_event(cls, event_type, *args, **kwargs):
         """Dispatches an incoming event to the ContinuousComputation
         classes which listen to events of that type.
+
+        Args:
+             event_type: str. The type of the event.
         """
         for klass in ALL_CONTINUOUS_COMPUTATION_MANAGERS:
             if event_type in klass.get_event_types_listened_to():


Test patch: