louisbrulenaudet commited on
Commit
c379997
β€’
1 Parent(s): aa6340d

Update app.py

Browse files

Documentation update in Numpydoc style.

Files changed (1) hide show
  1. app.py +34 -2
app.py CHANGED
@@ -68,7 +68,23 @@ I request that the following data is removed from The Stack and StackOverflow:
68
  _Note_: If you don't want all resources to be included just remove the elements from the list above. If you would like to exclude all repositories and resources just add a single element "all" to the list.
69
  """
70
 
71
- def issue_url(username, repos):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  title = urllib.parse.quote(opt_out_issue_title.format(username=username))
73
  body = urllib.parse.quote(opt_out_issue_body.format(repo_list=" - "+ "\n - ".join(repos)))
74
 
@@ -76,7 +92,23 @@ def issue_url(username, repos):
76
 
77
  return opt_out_text
78
 
79
- def check_username(username, version):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  output_md = ""
81
  repos = []
82
  if username in usernames:
 
68
  _Note_: If you don't want all resources to be included just remove the elements from the list above. If you would like to exclude all repositories and resources just add a single element "all" to the list.
69
  """
70
 
71
+ def issue_url(username:str, repos:list):
72
+ """
73
+ Generate the URL for creating an issue related to opting out from The Stack.
74
+
75
+ Parameters
76
+ ----------
77
+ username : str
78
+ The username for which the issue is being created.
79
+
80
+ repos : list of str
81
+ The list of repositories associated with the username.
82
+
83
+ Returns
84
+ -------
85
+ str
86
+ The URL for creating the opt-out issue.
87
+ """
88
  title = urllib.parse.quote(opt_out_issue_title.format(username=username))
89
  body = urllib.parse.quote(opt_out_issue_body.format(repo_list=" - "+ "\n - ".join(repos)))
90
 
 
92
 
93
  return opt_out_text
94
 
95
+ def check_username(username:str, version:str):
96
+ """
97
+ Check if the username has code in The Stack for a specific version.
98
+
99
+ Parameters
100
+ ----------
101
+ username : str
102
+ The username to check.
103
+
104
+ version : str
105
+ The version to check.
106
+
107
+ Returns
108
+ -------
109
+ tuple of str
110
+ A tuple containing the result markdown and the opt-out issue URL.
111
+ """
112
  output_md = ""
113
  repos = []
114
  if username in usernames: