Skip to content

Commit 743d481

Browse files
author
chadcarlson
committed
dicts not arrays
1 parent 56fdbbc commit 743d481

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

platformshconfig/config.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,25 +100,25 @@ class Config:
100100
_envPrefix = ''
101101

102102
"""
103-
The routes definition array. Only available at runtime.
103+
The routes definition dict. Only available at runtime.
104104
"""
105105
_routesDef = {}
106106

107107
"""
108-
The relationships definition array. Only available at runtime.
108+
The relationships definition dict. Only available at runtime.
109109
"""
110-
_relationshipsDef = []
110+
_relationshipsDef = {}
111111

112112
"""
113-
The variables definition array. Available in both build and runtime, although possibly with different
113+
The variables definition dict. Available in both build and runtime, although possibly with different
114114
values.
115115
"""
116-
_variablesDef = []
116+
_variablesDef = {}
117117

118118
"""
119-
The application definition array. This is, approximately, the .platform.app.yaml file in nested dictionary form.
119+
The application definition dict. This is, approximately, the .platform.app.yaml file in nested dictionary form.
120120
"""
121-
_applicationDef = []
121+
_applicationDef = {}
122122

123123
"""
124124
A map of the registered credential formatters. The key is the name, the value is a function.
@@ -198,7 +198,7 @@ def credentials(self, relationship, index=0):
198198
The index within the relationship to access. This is always 0, but reserved for future extension.
199199
200200
Returns:
201-
The credentials array for the service pointed to by the relationship.
201+
The credentials dict for the service pointed to by the relationship.
202202
203203
Raises:
204204
RuntimeError:
@@ -227,7 +227,7 @@ def credentials(self, relationship, index=0):
227227
return self._relationshipsDef[relationship][index]
228228

229229
def variable(self, name, default=None):
230-
"""Returns a variable from the VARIABLES array.
230+
"""Returns a variable from the VARIABLES dict.
231231
232232
Note:
233233
Variables prefixed with `env`: can be accessed as normal environment variables. This method will return
@@ -241,7 +241,7 @@ def variable(self, name, default=None):
241241
The default value to return if the variable is not defined. Defaults to None.
242242
243243
Returns:
244-
The value of the variable, or the specified default. This may be a string or an array.
244+
The value of the variable, or the specified default. This may be a string or an dict.
245245
246246
"""
247247

@@ -250,27 +250,27 @@ def variable(self, name, default=None):
250250
return self._variablesDef.get(name, default)
251251

252252
def variables(self):
253-
"""Returns the full variables array.
253+
"""Returns the full variables dict.
254254
255255
If you're looking for a specific variable, the variable() method is a more robust option.
256256
This method is for classes where you want to scan the whole variables list looking for a pattern.
257257
258258
Returns:
259-
The full variables array.
259+
The full variables dict.
260260
261261
"""
262262

263263
if not self.is_valid_platform():
264264
raise NotValidPlatformException(
265-
'You are not running on Platform.sh, so the variables array is not available.'
265+
'You are not running on Platform.sh, so the variables dict is not available.'
266266
)
267267
return self._variablesDef
268268

269269
def routes(self):
270270
"""Return the routes definition.
271271
272272
Returns:
273-
The routes array.
273+
The routes dict.
274274
275275
Raises:
276276
RuntimeError:
@@ -310,13 +310,13 @@ def get_route(self, route_id):
310310
raise KeyError('No such route id found: {}'.format(route_id))
311311

312312
def application(self):
313-
"""Returns the application definition array.
313+
"""Returns the application definition dict.
314314
315-
This is, approximately, the .platform.app.yaml file as a nested array. However, it also has other information
315+
This is, approximately, the .platform.app.yaml file as a nested dict. However, it also has other information
316316
added by Platform.sh as part of the build and deploy process.
317317
318318
Returns:
319-
The application definition array.
319+
The application definition dict.
320320
321321
"""
322322

@@ -436,7 +436,7 @@ def decode(variable):
436436
Base64-encoded JSON (the content of an environment variable).
437437
438438
Returns:
439-
An associative array (if representing a JSON object), or a scalar type.
439+
An associative dict (if representing a JSON object), or a scalar type.
440440
441441
Raises:
442442
JSON decoding error.

0 commit comments

Comments
 (0)