prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Scope "bug"
  ## Description of the problem, including code/CLI snippet
  I am using the list method of project.issues to list issues with certain label. I am searching issue having "vulcheck" as label. In my project I have one issue with "vulcheck" label
  
  ```python
  def issue_by_project_label(self):
      print(self._project.issues.list(labels="vulcheck"))
  ```
  
  ## Expected Behavior
  It should return me the issues with label "vulcheck". I have one issue with label "vulcheck".
  
  ## Actual Behavior
  It is returning empty list
  
  
  ## Specifications
  
    - python-gitlab version: 2.1.2
    - API version you are using (v3/v4): v4
    - Gitlab server version (or gitlab.com): 12.6.6-ee
  
  
  </issue>
  <code>
  [start of gitlab/types.py]
  1 # -*- coding: utf-8 -*-
  2 #
  3 # Copyright (C) 2018 Gauvain Pocentek <gauvain@pocentek.net>
  4 #
  5 # This program is free software: you can redistribute it and/or modify
  6 # it under the terms of the GNU Lesser General Public License as published by
  7 # the Free Software Foundation, either version 3 of the License, or
  8 # (at your option) any later version.
  9 #
  10 # This program is distributed in the hope that it will be useful,
  11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13 # GNU Lesser General Public License for more details.
  14 #
  15 # You should have received a copy of the GNU Lesser General Public License
  16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  17 
  18 
  19 class GitlabAttribute(object):
  20     def __init__(self, value=None):
  21         self._value = value
  22 
  23     def get(self):
  24         return self._value
  25 
  26     def set_from_cli(self, cli_value):
  27         self._value = cli_value
  28 
  29     def get_for_api(self):
  30         return self._value
  31 
  32 
  33 class ListAttribute(GitlabAttribute):
  34     def set_from_cli(self, cli_value):
  35         if not cli_value.strip():
  36             self._value = []
  37         else:
  38             self._value = [item.strip() for item in cli_value.split(",")]
  39 
  40     def get_for_api(self):
  41         return ",".join(self._value)
  42 
  43 
  44 class LowercaseStringAttribute(GitlabAttribute):
  45     def get_for_api(self):
  46         return str(self._value).lower()
  47 
  48 
  49 class FileAttribute(GitlabAttribute):
  50     def get_file_name(self, attr_name=None):
  51         return attr_name
  52 
  53 
  54 class ImageAttribute(FileAttribute):
  55     def get_file_name(self, attr_name=None):
  56         return "%s.png" % attr_name if attr_name else "image.png"
  57
  [end of gitlab/types.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/gitlab/types.py b/gitlab/types.py
  --- a/gitlab/types.py
  +++ b/gitlab/types.py
  @@ -38,6 +38,10 @@
               self._value = [item.strip() for item in cli_value.split(",")]
   
       def get_for_api(self):
  +        # Do not comma-split single value passed as string
  +        if isinstance(self._value, str):
  +            return self._value
  +
           return ",".join(self._value)
  
verification_info: {"golden_diff": "diff --git a/gitlab/types.py b/gitlab/types.py\n--- a/gitlab/types.py\n+++ b/gitlab/types.py\n@@ -38,6 +38,10 @@\n             self._value = [item.strip() for item in cli_value.split(\",\")]\n \n     def get_for_api(self):\n+        # Do not comma-split single value passed as string\n+        if isinstance(self._value, str):\n+            return self._value\n+\n         return \",\".join(self._value)\n", "issue": "Scope \"bug\"\n## Description of the problem, including code/CLI snippet\r\nI am using the list method of project.issues to list issues with certain label. I am searching issue having \"vulcheck\" as label. In my project I have one issue with \"vulcheck\" label\r\n\r\n```python\r\ndef issue_by_project_label(self):\r\n    print(self._project.issues.list(labels=\"vulcheck\"))\r\n```\r\n\r\n## Expected Behavior\r\nIt should return me the issues with label \"vulcheck\". I have one issue with label \"vulcheck\".\r\n\r\n## Actual Behavior\r\nIt is returning empty list\r\n\r\n\r\n## Specifications\r\n\r\n  - python-gitlab version: 2.1.2\r\n  - API version you are using (v3/v4): v4\r\n  - Gitlab server version (or gitlab.com): 12.6.6-ee\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2018 Gauvain Pocentek <gauvain@pocentek.net>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU Lesser General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n\nclass GitlabAttribute(object):\n    def __init__(self, value=None):\n        self._value = value\n\n    def get(self):\n        return self._value\n\n    def set_from_cli(self, cli_value):\n        self._value = cli_value\n\n    def get_for_api(self):\n        return self._value\n\n\nclass ListAttribute(GitlabAttribute):\n    def set_from_cli(self, cli_value):\n        if not cli_value.strip():\n            self._value = []\n        else:\n            self._value = [item.strip() for item in cli_value.split(\",\")]\n\n    def get_for_api(self):\n        return \",\".join(self._value)\n\n\nclass LowercaseStringAttribute(GitlabAttribute):\n    def get_for_api(self):\n        return str(self._value).lower()\n\n\nclass FileAttribute(GitlabAttribute):\n    def get_file_name(self, attr_name=None):\n        return attr_name\n\n\nclass ImageAttribute(FileAttribute):\n    def get_file_name(self, attr_name=None):\n        return \"%s.png\" % attr_name if attr_name else \"image.png\"\n", "path": "gitlab/types.py"}]}