36
36
@async_to_sync
37
37
class TemplateClass (BaseQuery ):
38
38
39
- """
40
- Not all the methods below are necessary but these cover most of the common
41
- cases, new methods may be added if necessary, follow the guidelines at
42
- <http://astroquery.readthedocs.io/en/latest/api.html>
43
- """
39
+ def __init__ (self , url = '' , timeout = None ):
40
+ self .url = url # A falsy default that cannot be mistaken for a valid value.
41
+ self .timeout = timeout # Use `None` as default if the falsy value could be valid.
44
42
45
43
# The private properties defined here allow the users to change the
46
44
# configuration values at runtime, or to completely override them with
47
45
# instance attributes.
48
- url = '' # A falsy default that cannot be mistaken for a valid value.
49
- timeout = None # Use `None` if the falsy value could be valid.
50
46
51
47
@property
52
48
def _url (self ):
@@ -56,6 +52,12 @@ def _url(self):
56
52
def _timeout (self ):
57
53
return conf .timeout if self .timeout is None else self .timeout
58
54
55
+ """
56
+ Not all the methods below are necessary but these cover most of the common
57
+ cases, new methods may be added if necessary, follow the guidelines at
58
+ <http://astroquery.readthedocs.io/en/latest/api.html>
59
+ """
60
+
59
61
# all query methods are implemented with an "async" method that handles
60
62
# making the actual HTTP request and returns the raw HTTP response, which
61
63
# should be parsed by a separate _parse_result method. The query_object
@@ -332,7 +334,7 @@ def extract_image_urls(self, html_str):
332
334
pass
333
335
334
336
335
- # the default tool for users to interact with is an instance of the Class
337
+ # the default tool for users to interact with is a default instance of the Class
336
338
Template = TemplateClass ()
337
339
338
340
# once your class is done, tests should be written
0 commit comments