Skip to content

Commit 20a6af5

Browse files
authored
Bulk reformat docstrings (#732)
Cleaned up using `docformatter`. Probably a one-time thing.
1 parent c029cfd commit 20a6af5

33 files changed

+3148
-2615
lines changed

kaggle/api/kaggle_api.py

Lines changed: 92 additions & 79 deletions
Large diffs are not rendered by default.

kaggle/api/kaggle_api_extended.py

Lines changed: 817 additions & 789 deletions
Large diffs are not rendered by default.

kaggle/configuration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
class Configuration:
2727

2828
def __init__(self):
29-
"""Constructor"""
29+
"""Constructor."""
3030
# Default Base url
3131
self.host = _get_endpoint_from_env() or "https://www.kaggle.com/api/v1"
3232

@@ -100,7 +100,7 @@ def logger_file(self, value):
100100

101101
@property
102102
def debug(self):
103-
"""Debug status
103+
"""Debug status.
104104
105105
:param value: The debug status, True or False.
106106
:type: bool
@@ -109,7 +109,7 @@ def debug(self):
109109

110110
@debug.setter
111111
def debug(self, value):
112-
"""Debug status
112+
"""Debug status.
113113
114114
:param value: The debug status, True or False.
115115
:type: bool

kaggle/models/dataset_column.py

Lines changed: 58 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -74,121 +74,130 @@ def __init__(self,
7474

7575
@property
7676
def order(self):
77-
"""Gets the order of this DatasetColumn. # noqa: E501
77+
"""Gets the order of this DatasetColumn. # noqa: E501.
7878
79-
The order that the column comes in, 0-based. (The first column is 0, second is 1, etc.) # noqa: E501
79+
The order that the column comes in, 0-based. (The first column is 0,
80+
second is 1, etc.) # noqa: E501
8081
81-
:return: The order of this DatasetColumn. # noqa: E501
82-
:rtype: float
83-
"""
82+
:return: The order of this DatasetColumn. # noqa: E501
83+
:rtype: float
84+
"""
8485
return self._order
8586

8687
@order.setter
8788
def order(self, order):
8889
"""Sets the order of this DatasetColumn.
8990
90-
The order that the column comes in, 0-based. (The first column is 0, second is 1, etc.) # noqa: E501
91+
The order that the column comes in, 0-based. (The first column is 0,
92+
second is 1, etc.) # noqa: E501
9193
92-
:param order: The order of this DatasetColumn. # noqa: E501
93-
:type: float
94-
"""
94+
:param order: The order of this DatasetColumn. # noqa: E501
95+
:type: float
96+
"""
9597

9698
self._order = order
9799

98100
@property
99101
def name(self):
100-
"""Gets the name of this DatasetColumn. # noqa: E501
102+
"""Gets the name of this DatasetColumn. # noqa: E501.
101103
102-
The column name # noqa: E501
104+
The column name # noqa: E501
103105
104-
:return: The name of this DatasetColumn. # noqa: E501
105-
:rtype: str
106-
"""
106+
:return: The name of this DatasetColumn. # noqa: E501
107+
:rtype: str
108+
"""
107109
return self._name
108110

109111
@name.setter
110112
def name(self, name):
111113
"""Sets the name of this DatasetColumn.
112114
113-
The column name # noqa: E501
115+
The column name # noqa: E501
114116
115-
:param name: The name of this DatasetColumn. # noqa: E501
116-
:type: str
117-
"""
117+
:param name: The name of this DatasetColumn. # noqa: E501
118+
:type: str
119+
"""
118120

119121
self._name = name
120122

121123
@property
122124
def type(self):
123-
"""Gets the type of this DatasetColumn. # noqa: E501
125+
"""Gets the type of this DatasetColumn. # noqa: E501.
124126
125-
The type of all of the fields in the column. Please see the data types on https://github.com/Kaggle/kaggle-api/wiki/Dataset-Metadata # noqa: E501
127+
The type of all of the fields in the column. Please see the data
128+
types on
129+
https://github.com/Kaggle/kaggle-api/wiki/Dataset-Metadata
130+
# noqa: E501
126131
127-
:return: The type of this DatasetColumn. # noqa: E501
128-
:rtype: str
129-
"""
132+
:return: The type of this DatasetColumn. # noqa: E501
133+
:rtype: str
134+
"""
130135
return self._type
131136

132137
@type.setter
133138
def type(self, type):
134139
"""Sets the type of this DatasetColumn.
135140
136-
The type of all of the fields in the column. Please see the data types on https://github.com/Kaggle/kaggle-api/wiki/Dataset-Metadata # noqa: E501
141+
The type of all of the fields in the column. Please see the data
142+
types on
143+
https://github.com/Kaggle/kaggle-api/wiki/Dataset-Metadata
144+
# noqa: E501
137145
138-
:param type: The type of this DatasetColumn. # noqa: E501
139-
:type: str
140-
"""
146+
:param type: The type of this DatasetColumn. # noqa: E501
147+
:type: str
148+
"""
141149

142150
self._type = type
143151

144152
@property
145153
def original_type(self):
146-
"""Gets the original_type of this DatasetColumn. # noqa: E501
154+
"""Gets the original_type of this DatasetColumn. # noqa: E501.
147155
148-
Used to store the original type of the column, which will be converted to Kaggle's types. For example, an `originalType` of `\"integer\"` would convert to a `type` of `\"numeric\"` # noqa: E501
156+
Used to store the original type of the column, which will be converted to Kaggle's types. For example, an `originalType` of `\"integer\"` would convert to a `type` of `\"numeric\"` # noqa: E501
149157
150-
:return: The original_type of this DatasetColumn. # noqa: E501
151-
:rtype: str
152-
"""
158+
:return: The original_type of this DatasetColumn. # noqa: E501
159+
:rtype: str
160+
"""
153161
return self._original_type
154162

155163
@original_type.setter
156164
def original_type(self, original_type):
157165
"""Sets the original_type of this DatasetColumn.
158166
159-
Used to store the original type of the column, which will be converted to Kaggle's types. For example, an `originalType` of `\"integer\"` would convert to a `type` of `\"numeric\"` # noqa: E501
167+
Used to store the original type of the column, which will be converted to Kaggle's types. For example, an `originalType` of `\"integer\"` would convert to a `type` of `\"numeric\"` # noqa: E501
160168
161-
:param original_type: The original_type of this DatasetColumn. # noqa: E501
162-
:type: str
163-
"""
169+
:param original_type: The original_type of this DatasetColumn. # noqa: E501
170+
:type: str
171+
"""
164172

165173
self._original_type = original_type
166174

167175
@property
168176
def description(self):
169-
"""Gets the description of this DatasetColumn. # noqa: E501
177+
"""Gets the description of this DatasetColumn. # noqa: E501.
170178
171-
The description of the column # noqa: E501
179+
The description of the column # noqa: E501
172180
173-
:return: The description of this DatasetColumn. # noqa: E501
174-
:rtype: str
175-
"""
181+
:return: The description of this DatasetColumn. # noqa: E501
182+
:rtype: str
183+
"""
176184
return self._description
177185

178186
@description.setter
179187
def description(self, description):
180188
"""Sets the description of this DatasetColumn.
181189
182-
The description of the column # noqa: E501
190+
The description of the column # noqa: E501
183191
184-
:param description: The description of this DatasetColumn. # noqa: E501
185-
:type: str
186-
"""
192+
:param description: The description of this DatasetColumn. # noqa:
193+
E501
194+
:type: str
195+
"""
187196

188197
self._description = description
189198

190199
def to_dict(self):
191-
"""Returns the model properties as a dict"""
200+
"""Returns the model properties as a dict."""
192201
result = {}
193202

194203
for attr, _ in six.iteritems(self.column_types):
@@ -209,20 +218,20 @@ def to_dict(self):
209218
return result
210219

211220
def to_str(self):
212-
"""Returns the string representation of the model"""
221+
"""Returns the string representation of the model."""
213222
return pprint.pformat(self.to_dict())
214223

215224
def __repr__(self):
216225
"""For `print` and `pprint`"""
217226
return self.to_str()
218227

219228
def __eq__(self, other):
220-
"""Returns true if both objects are equal"""
229+
"""Returns true if both objects are equal."""
221230
if not isinstance(other, DatasetColumn):
222231
return False
223232

224233
return self.__dict__ == other.__dict__
225234

226235
def __ne__(self, other):
227-
"""Returns true if both objects are not equal"""
236+
"""Returns true if both objects are not equal."""
228237
return not self == other

0 commit comments

Comments
 (0)