prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  `DocstyleDefinition`: Accept a single marker set also
  Via the normal constructor or a class method.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `coalib/bearlib/languages/documentation/DocstyleDefinition.py`
  Content:
  ```
  1 import os.path
  2 
  3 from coalib.misc.Decorators import generate_eq, generate_repr, enforce_signature
  4 from coalib.parsing.ConfParser import ConfParser
  5 
  6 
  7 @generate_repr()
  8 @generate_eq("language", "docstyle", "markers")
  9 class DocstyleDefinition:
  10     """
  11     The DocstyleDefinition class holds values that identify a certain type of
  12     documentation comment (for which language, documentation style/tool used
  13     etc.).
  14     """
  15 
  16     @enforce_signature
  17     def __init__(self, language: str, docstyle: str, markers):
  18         """
  19         Instantiates a new DocstyleDefinition.
  20 
  21         :param language: The case insensitive programming language of the
  22                          documentation comment, e.g. `"CPP"` for C++ or
  23                          `"PYTHON3"`.
  24         :param docstyle: The case insensitive documentation style/tool used
  25                          to document code, e.g. `"default"` or `"doxygen"`.
  26         :param markers:  An iterable of marker/delimiter string iterables that
  27                          identify a documentation comment. See `markers`
  28                          property for more details on markers.
  29         """
  30         self._language = language.lower()
  31         self._docstyle = docstyle.lower()
  32         self._markers = tuple(tuple(marker_set) for marker_set in markers)
  33 
  34         # Check marker set dimensions.
  35         for marker_set in self._markers:
  36             length = len(marker_set)
  37             if length != 3:
  38                 raise ValueError("Length of a given marker set was not 3 (was "
  39                                  "actually {}).".format(length))
  40 
  41     @property
  42     def language(self):
  43         """
  44         The programming language.
  45 
  46         :return: A lower-case string defining the programming language (i.e.
  47                  "cpp" or "python").
  48         """
  49         return self._language
  50 
  51     @property
  52     def docstyle(self):
  53         """
  54         The documentation style/tool used to document code.
  55 
  56         :return: A lower-case string defining the docstyle (i.e. "default" or
  57                  "doxygen").
  58         """
  59         return self._docstyle
  60 
  61     @property
  62     def markers(self):
  63         """
  64         A tuple of marker sets that identify a documentation comment.
  65 
  66         Marker sets consist of 3 entries where the first is the start-marker,
  67         the second one the each-line marker and the last one the end-marker.
  68         For example a marker tuple with a single marker set
  69         `(("/**", "*", "*/"),)` would match following documentation comment:
  70 
  71         ```
  72         /**
  73          * This is documentation.
  74          */
  75         ```
  76 
  77         It's also possible to supply an empty each-line marker
  78         (`("/**", "", "*/")`):
  79 
  80         ```
  81         /**
  82          This is more documentation.
  83          */
  84         ```
  85 
  86         Markers are matched "greedy", that means it will match as many
  87         each-line markers as possible. I.e. for `("///", "///", "///")`):
  88 
  89         ```
  90         /// Brief documentation.
  91         ///
  92         /// Detailed documentation.
  93         ```
  94 
  95         :return: A tuple of marker/delimiter string tuples that identify a
  96                  documentation comment.
  97         """
  98         return self._markers
  99 
  100     @classmethod
  101     @enforce_signature
  102     def load(cls, language: str, docstyle: str):
  103         """
  104         Loads a `DocstyleDefinition` from the coala docstyle definition files.
  105 
  106         This function considers all settings inside the according coalang-files
  107         as markers.
  108 
  109         :param language:           The case insensitive programming language of
  110                                    the documentation comment as a string.
  111         :param docstyle:           The case insensitive documentation
  112                                    style/tool used to document code, e.g.
  113                                    `"default"` or `"doxygen"`.
  114         :raises FileNotFoundError: Raised when the given docstyle was not
  115                                    found.
  116         :raises KeyError:          Raised when the given language is not
  117                                    defined for given docstyle.
  118         :return:                   The `DocstyleDefinition` for given language
  119                                    and docstyle.
  120         """
  121 
  122         docstyle = docstyle.lower()
  123 
  124         language_config_parser = ConfParser(remove_empty_iter_elements=False)
  125         try:
  126             docstyle_settings = language_config_parser.parse(
  127                 os.path.dirname(__file__) + "/" + docstyle + ".coalang")
  128         except FileNotFoundError:
  129             raise FileNotFoundError("Docstyle definition " + repr(docstyle) +
  130                                     " not found.")
  131 
  132         language = language.lower()
  133 
  134         try:
  135             docstyle_settings = docstyle_settings[language]
  136         except KeyError:
  137             raise KeyError("Language {} is not defined for docstyle {}."
  138                            .format(repr(language), repr(docstyle)))
  139 
  140         marker_sets = (tuple(value)
  141                        for key, value in
  142                        filter(lambda kv: not kv[0].startswith("comment"),
  143                               docstyle_settings.contents.items()))
  144 
  145         return cls(language, docstyle, marker_sets)
  146
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/coalib/bearlib/languages/documentation/DocstyleDefinition.py b/coalib/bearlib/languages/documentation/DocstyleDefinition.py
  --- a/coalib/bearlib/languages/documentation/DocstyleDefinition.py
  +++ b/coalib/bearlib/languages/documentation/DocstyleDefinition.py
  @@ -23,12 +23,19 @@
                            `"PYTHON3"`.
           :param docstyle: The case insensitive documentation style/tool used
                            to document code, e.g. `"default"` or `"doxygen"`.
  -        :param markers:  An iterable of marker/delimiter string iterables that
  +        :param markers:  An iterable of marker/delimiter string iterables
  +                         or a single marker/delimiter string iterable that
                            identify a documentation comment. See `markers`
                            property for more details on markers.
           """
           self._language = language.lower()
           self._docstyle = docstyle.lower()
  +
  +        # Check and modify tuple if only one marker_set exists.
  +        markers = tuple(markers)
  +        if len(markers) == 3 and all(isinstance(x, str) for x in markers):
  +            markers = (markers,)
  +
           self._markers = tuple(tuple(marker_set) for marker_set in markers)
   
           # Check marker set dimensions.
  
verification_info: {"golden_diff": "diff --git a/coalib/bearlib/languages/documentation/DocstyleDefinition.py b/coalib/bearlib/languages/documentation/DocstyleDefinition.py\n--- a/coalib/bearlib/languages/documentation/DocstyleDefinition.py\n+++ b/coalib/bearlib/languages/documentation/DocstyleDefinition.py\n@@ -23,12 +23,19 @@\n                          `\"PYTHON3\"`.\n         :param docstyle: The case insensitive documentation style/tool used\n                          to document code, e.g. `\"default\"` or `\"doxygen\"`.\n-        :param markers:  An iterable of marker/delimiter string iterables that\n+        :param markers:  An iterable of marker/delimiter string iterables\n+                         or a single marker/delimiter string iterable that\n                          identify a documentation comment. See `markers`\n                          property for more details on markers.\n         \"\"\"\n         self._language = language.lower()\n         self._docstyle = docstyle.lower()\n+\n+        # Check and modify tuple if only one marker_set exists.\n+        markers = tuple(markers)\n+        if len(markers) == 3 and all(isinstance(x, str) for x in markers):\n+            markers = (markers,)\n+\n         self._markers = tuple(tuple(marker_set) for marker_set in markers)\n \n         # Check marker set dimensions.\n", "issue": "`DocstyleDefinition`: Accept a single marker set also\nVia the normal constructor or a class method.\n\n", "before_files": [{"content": "import os.path\n\nfrom coalib.misc.Decorators import generate_eq, generate_repr, enforce_signature\nfrom coalib.parsing.ConfParser import ConfParser\n\n\n@generate_repr()\n@generate_eq(\"language\", \"docstyle\", \"markers\")\nclass DocstyleDefinition:\n    \"\"\"\n    The DocstyleDefinition class holds values that identify a certain type of\n    documentation comment (for which language, documentation style/tool used\n    etc.).\n    \"\"\"\n\n    @enforce_signature\n    def __init__(self, language: str, docstyle: str, markers):\n        \"\"\"\n        Instantiates a new DocstyleDefinition.\n\n        :param language: The case insensitive programming language of the\n                         documentation comment, e.g. `\"CPP\"` for C++ or\n                         `\"PYTHON3\"`.\n        :param docstyle: The case insensitive documentation style/tool used\n                         to document code, e.g. `\"default\"` or `\"doxygen\"`.\n        :param markers:  An iterable of marker/delimiter string iterables that\n                         identify a documentation comment. See `markers`\n                         property for more details on markers.\n        \"\"\"\n        self._language = language.lower()\n        self._docstyle = docstyle.lower()\n        self._markers = tuple(tuple(marker_set) for marker_set in markers)\n\n        # Check marker set dimensions.\n        for marker_set in self._markers:\n            length = len(marker_set)\n            if length != 3:\n                raise ValueError(\"Length of a given marker set was not 3 (was \"\n                                 \"actually {}).\".format(length))\n\n    @property\n    def language(self):\n        \"\"\"\n        The programming language.\n\n        :return: A lower-case string defining the programming language (i.e.\n                 \"cpp\" or \"python\").\n        \"\"\"\n        return self._language\n\n    @property\n    def docstyle(self):\n        \"\"\"\n        The documentation style/tool used to document code.\n\n        :return: A lower-case string defining the docstyle (i.e. \"default\" or\n                 \"doxygen\").\n        \"\"\"\n        return self._docstyle\n\n    @property\n    def markers(self):\n        \"\"\"\n        A tuple of marker sets that identify a documentation comment.\n\n        Marker sets consist of 3 entries where the first is the start-marker,\n        the second one the each-line marker and the last one the end-marker.\n        For example a marker tuple with a single marker set\n        `((\"/**\", \"*\", \"*/\"),)` would match following documentation comment:\n\n        ```\n        /**\n         * This is documentation.\n         */\n        ```\n\n        It's also possible to supply an empty each-line marker\n        (`(\"/**\", \"\", \"*/\")`):\n\n        ```\n        /**\n         This is more documentation.\n         */\n        ```\n\n        Markers are matched \"greedy\", that means it will match as many\n        each-line markers as possible. I.e. for `(\"///\", \"///\", \"///\")`):\n\n        ```\n        /// Brief documentation.\n        ///\n        /// Detailed documentation.\n        ```\n\n        :return: A tuple of marker/delimiter string tuples that identify a\n                 documentation comment.\n        \"\"\"\n        return self._markers\n\n    @classmethod\n    @enforce_signature\n    def load(cls, language: str, docstyle: str):\n        \"\"\"\n        Loads a `DocstyleDefinition` from the coala docstyle definition files.\n\n        This function considers all settings inside the according coalang-files\n        as markers.\n\n        :param language:           The case insensitive programming language of\n                                   the documentation comment as a string.\n        :param docstyle:           The case insensitive documentation\n                                   style/tool used to document code, e.g.\n                                   `\"default\"` or `\"doxygen\"`.\n        :raises FileNotFoundError: Raised when the given docstyle was not\n                                   found.\n        :raises KeyError:          Raised when the given language is not\n                                   defined for given docstyle.\n        :return:                   The `DocstyleDefinition` for given language\n                                   and docstyle.\n        \"\"\"\n\n        docstyle = docstyle.lower()\n\n        language_config_parser = ConfParser(remove_empty_iter_elements=False)\n        try:\n            docstyle_settings = language_config_parser.parse(\n                os.path.dirname(__file__) + \"/\" + docstyle + \".coalang\")\n        except FileNotFoundError:\n            raise FileNotFoundError(\"Docstyle definition \" + repr(docstyle) +\n                                    \" not found.\")\n\n        language = language.lower()\n\n        try:\n            docstyle_settings = docstyle_settings[language]\n        except KeyError:\n            raise KeyError(\"Language {} is not defined for docstyle {}.\"\n                           .format(repr(language), repr(docstyle)))\n\n        marker_sets = (tuple(value)\n                       for key, value in\n                       filter(lambda kv: not kv[0].startswith(\"comment\"),\n                              docstyle_settings.contents.items()))\n\n        return cls(language, docstyle, marker_sets)\n", "path": "coalib/bearlib/languages/documentation/DocstyleDefinition.py"}], "after_files": [{"content": "import os.path\n\nfrom coalib.misc.Decorators import generate_eq, generate_repr, enforce_signature\nfrom coalib.parsing.ConfParser import ConfParser\n\n\n@generate_repr()\n@generate_eq(\"language\", \"docstyle\", \"markers\")\nclass DocstyleDefinition:\n    \"\"\"\n    The DocstyleDefinition class holds values that identify a certain type of\n    documentation comment (for which language, documentation style/tool used\n    etc.).\n    \"\"\"\n\n    @enforce_signature\n    def __init__(self, language: str, docstyle: str, markers):\n        \"\"\"\n        Instantiates a new DocstyleDefinition.\n\n        :param language: The case insensitive programming language of the\n                         documentation comment, e.g. `\"CPP\"` for C++ or\n                         `\"PYTHON3\"`.\n        :param docstyle: The case insensitive documentation style/tool used\n                         to document code, e.g. `\"default\"` or `\"doxygen\"`.\n        :param markers:  An iterable of marker/delimiter string iterables\n                         or a single marker/delimiter string iterable that\n                         identify a documentation comment. See `markers`\n                         property for more details on markers.\n        \"\"\"\n        self._language = language.lower()\n        self._docstyle = docstyle.lower()\n\n        # Check and modify tuple if only one marker_set exists.\n        markers = tuple(markers)\n        if len(markers) == 3 and all(isinstance(x, str) for x in markers):\n            markers = (markers,)\n\n        self._markers = tuple(tuple(marker_set) for marker_set in markers)\n\n        # Check marker set dimensions.\n        for marker_set in self._markers:\n            length = len(marker_set)\n            if length != 3:\n                raise ValueError(\"Length of a given marker set was not 3 (was \"\n                                 \"actually {}).\".format(length))\n\n    @property\n    def language(self):\n        \"\"\"\n        The programming language.\n\n        :return: A lower-case string defining the programming language (i.e.\n                 \"cpp\" or \"python\").\n        \"\"\"\n        return self._language\n\n    @property\n    def docstyle(self):\n        \"\"\"\n        The documentation style/tool used to document code.\n\n        :return: A lower-case string defining the docstyle (i.e. \"default\" or\n                 \"doxygen\").\n        \"\"\"\n        return self._docstyle\n\n    @property\n    def markers(self):\n        \"\"\"\n        A tuple of marker sets that identify a documentation comment.\n\n        Marker sets consist of 3 entries where the first is the start-marker,\n        the second one the each-line marker and the last one the end-marker.\n        For example a marker tuple with a single marker set\n        `((\"/**\", \"*\", \"*/\"),)` would match following documentation comment:\n\n        ```\n        /**\n         * This is documentation.\n         */\n        ```\n\n        It's also possible to supply an empty each-line marker\n        (`(\"/**\", \"\", \"*/\")`):\n\n        ```\n        /**\n         This is more documentation.\n         */\n        ```\n\n        Markers are matched \"greedy\", that means it will match as many\n        each-line markers as possible. I.e. for `(\"///\", \"///\", \"///\")`):\n\n        ```\n        /// Brief documentation.\n        ///\n        /// Detailed documentation.\n        ```\n\n        :return: A tuple of marker/delimiter string tuples that identify a\n                 documentation comment.\n        \"\"\"\n        return self._markers\n\n    @classmethod\n    @enforce_signature\n    def load(cls, language: str, docstyle: str):\n        \"\"\"\n        Loads a `DocstyleDefinition` from the coala docstyle definition files.\n\n        This function considers all settings inside the according coalang-files\n        as markers.\n\n        :param language:           The case insensitive programming language of\n                                   the documentation comment as a string.\n        :param docstyle:           The case insensitive documentation\n                                   style/tool used to document code, e.g.\n                                   `\"default\"` or `\"doxygen\"`.\n        :raises FileNotFoundError: Raised when the given docstyle was not\n                                   found.\n        :raises KeyError:          Raised when the given language is not\n                                   defined for given docstyle.\n        :return:                   The `DocstyleDefinition` for given language\n                                   and docstyle.\n        \"\"\"\n\n        docstyle = docstyle.lower()\n\n        language_config_parser = ConfParser(remove_empty_iter_elements=False)\n        try:\n            docstyle_settings = language_config_parser.parse(\n                os.path.dirname(__file__) + \"/\" + docstyle + \".coalang\")\n        except FileNotFoundError:\n            raise FileNotFoundError(\"Docstyle definition \" + repr(docstyle) +\n                                    \" not found.\")\n\n        language = language.lower()\n\n        try:\n            docstyle_settings = docstyle_settings[language]\n        except KeyError:\n            raise KeyError(\"Language {} is not defined for docstyle {}.\"\n                           .format(repr(language), repr(docstyle)))\n\n        marker_sets = (tuple(value)\n                       for key, value in\n                       filter(lambda kv: not kv[0].startswith(\"comment\"),\n                              docstyle_settings.contents.items()))\n\n        return cls(language, docstyle, marker_sets)\n", "path": "coalib/bearlib/languages/documentation/DocstyleDefinition.py"}]}