@@ -30,72 +30,71 @@ class DbFactory(ABC):
3030 def get_db_connector (self , uri : str , schema : Optional [str ]) -> DBConnector :
3131 """Returns an instance of connector to database (:class:`DBConnector`).
3232
33- :param str uri: Database connection string.
34- :param str schema: Database schema.
35- :return: A connector to specific database .
36- :rtype: :class:`DBConnector`
37- :raises :class:`DBConnectorError`: when the connection fails.
38- """
33+ Args:
34+ schema (str) : Database schema.
35+ uri (str): Database connection string .
36+
37+ Returns:
38+ :class:`DBConnector`: A connector to specific database. """
3939
4040 @abstractmethod
4141 def get_db_command_config_manager (
4242 self , configuration : Ili2DbCommandConfiguration
4343 ) -> DbCommandConfigManager :
4444 """Returns an instance of a database command config manager.
4545
46- :param configuration: Configuration object that will be managed.
47- :type configuration: :class:`Ili2DbCommandConfiguration`
48- :return: Object that manages a configuration object to return specific information of some database.
49- :rtype :class:`DbCommandConfigManager`
50- """
46+ Args:
47+ configuration ( :class:`Ili2DbCommandConfiguration`): Configuration object that will be managed.
48+
49+ Returns:
50+ Object that manages a configuration object to return specific information of some database. """
5151
5252 @abstractmethod
5353 def get_layer_uri (self , uri : str ) -> LayerUri :
5454 """Returns an instance of a layer uri.
5555
56- :param str uri: Database connection string.
57- :return: A object that provides layer uri.
58- :rtype :class:`LayerUri`
59- """
56+ Args:
57+ uri (str): Database connection string.
58+
59+ Returns:
60+ A object that provides layer uri."""
6061
6162 @abstractmethod
6263 def pre_generate_project (
6364 self , configuration : Ili2DbCommandConfiguration
6465 ) -> tuple [bool , str ]:
6566 """This method will be called before an operation of generate project is executed.
6667
67- :param configuration: Configuration parameters with which will be executed the operation of generate project.
68- :type configuration: :class:`Ili2DbCommandConfiguration`
69- :return: *True* and an empty message if the called method was succeeded, *False* and a warning message otherwise.
70- """
68+ Args:
69+ configuration (:class:`Ili2DbCommandConfiguration`): Configuration parameters with which will be executed the operation of generate project.
70+
71+ Returns:
72+ *True* and an empty message if the called method was succeeded, *False* and a warning message otherwise."""
7173
7274 @abstractmethod
7375 def post_generate_project_validations (
7476 self , configuration : Ili2DbCommandConfiguration , fallback_user : str = None
7577 ) -> tuple [bool , str ]:
7678 """This method will be called after an operation of generate project is executed.
7779
78- :param class:`Ili2DbCommandConfiguration` configuration: Configuration parameters with which were executed the operation of generate project.
79- :param str fallback_user: a username as fallback most possibly used when you want to pass your os account name to connect the database
80- :return: *True* and an empty message if the called method was succeeded, *False* and a warning message otherwise.
81- """
80+ Args:
81+ class: `Ili2DbCommandConfiguration` configuration: Configuration parameters with which were executed the operation of generate project.
82+ fallback_user (str): a username as fallback most possibly used when you want to pass your os account name to connect the database
8283
83- def get_specific_messages ( self ) -> dict [ str , str ] :
84- """Returns specific words that will be used in warning and error messages.
84+ Returns :
85+ *True* and an empty message if the called method was succeeded, *False* and a warning message otherwise."""
8586
86- :rtype dict
87- """
87+ def get_specific_messages ( self ) -> dict [ str , str ]:
88+ """Returns specific words that will be used in warning and error messages."""
8889 messages = {"db_or_schema" : "schema" , "layers_source" : "schema" }
8990
9091 return messages
9192
9293 def customize_widget_editor (self , field : Field , data_type : str ) -> None :
9394 """Allows customizing the way a field is shown in the widget editor.
9495
95- For instance, a boolean field can be shown as a checkbox.
96+ For instance, a boolean field can be shown as a checkbox.
9697
97- :param field: The field that will be customized
98- :type field: :class:`Field`
99- :param data_type: The type of field
100- :return None
101- """
98+ Args:
99+ data_type: The type of field
100+ field (:class:`Field`): The field that will be customized"""
0 commit comments