prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [701] No 'galaxy_info' found results in meta/requirements.yml file
  ### Summary
  
  ansible-lint reporting `[701] No 'galaxy_info' found` in my `meta/requirements.yml`, a file that unlike `meta/main.yml` does not (to my knowledge) support a `galaxy_info` field.
  
  ##### Issue Type
  
  - Bug Report
  
  ##### Ansible and Ansible Lint details
  <!--- Paste verbatim output between tripple backticks -->
  ```console (paste below)
  $ ansible --version
  ansible 2.10.1
  
  $ ansible-lint --version
  ansible-lint 4.3.5
  ```
  
  - ansible installation method: pipenv (pip)
  - ansible-lint installation method: pipenv (pip)
  
  ##### OS / ENVIRONMENT
  MacOS 10.15.7 (Catalina Latest)
  
  ##### STEPS TO REPRODUCE
  
  Using this `meta/requirements.yml`
  ```bash
  ---
  
  # insert third party deps here. download with:
  # ansible-galaxy install -r requirements.yml
  # https://docs.ansible.com/ansible/galaxy.html
  
  - name: singleplatform-eng.users
    version: v1.2.6
  
  - name: weareinteractive.sudo
    version: 1.14.1
  
  - name: geerlingguy.fluentd
    version: 1.1.0
  ```
  
  Note that `meta/main.yml` does include `galaxy_info`, but does not include as dependencies, the roles listed in requirements.yml. This is purposeful because I'm choosing `meta/requirements.yml` instead of `meta/main.yml` because I prefer the workflow and do not want the roles running first, as they do when in `meta/main.yml`.  I'm following the previously linked user-guide on this topic.
  
  To reproduce, I simply run ansible-lint directly or via molecule.
  
  ##### Desired Behaviour
  
  I would expect ansible-lint not to flag these as issues... unless I'm completely misunderstanding the finding and misreading the documentation associated with this rule.
  
  ##### Actual Behaviour
  
  
  Below are the ansible-lint results when run on my role.
  ```bash
  $ ansible-lint
  [701] No 'galaxy_info' found
  meta/requirements.yml:7
  {'meta/main.yml': {'name': 'singleplatform-eng.users', 'version': 'v1.2.6', '__line__': 7, '__file__': '/Users/tmichael/orgs/tmb/ansible_roles/base/meta/requirements.yml', 'skipped_rules': []}}
  
  [701] No 'galaxy_info' found
  meta/requirements.yml:10
  {'meta/main.yml': {'name': 'weareinteractive.sudo', 'version': '1.14.1', '__line__': 10, '__file__': '/Users/tmichael/orgs/tmb/ansible_roles/base/meta/requirements.yml'}}
  
  [701] No 'galaxy_info' found
  meta/requirements.yml:13
  {'meta/main.yml': {'name': 'geerlingguy.fluentd', 'version': '1.1.0', '__line__': 13, '__file__': '/Users/tmichael/orgs/tmb/ansible_roles/base/meta/requirements.yml'}}
  ```
  
  </issue>
  <code>
  [start of lib/ansiblelint/rules/MetaMainHasInfoRule.py]
  1 # Copyright (c) 2016, Will Thames and contributors
  2 # Copyright (c) 2018, Ansible Project
  3 
  4 from ansiblelint.rules import AnsibleLintRule
  5 
  6 META_STR_INFO = (
  7     'author',
  8     'description'
  9 )
  10 META_INFO = tuple(list(META_STR_INFO) + [
  11     'license',
  12     'min_ansible_version',
  13     'platforms',
  14 ])
  15 
  16 
  17 def _platform_info_errors_itr(platforms):
  18     if not isinstance(platforms, list):
  19         yield 'Platforms should be a list of dictionaries'
  20         return
  21 
  22     for platform in platforms:
  23         if not isinstance(platform, dict):
  24             yield 'Platforms should be a list of dictionaries'
  25         elif 'name' not in platform:
  26             yield 'Platform should contain name'
  27 
  28 
  29 def _galaxy_info_errors_itr(galaxy_info,
  30                             info_list=META_INFO,
  31                             str_info_list=META_STR_INFO):
  32     for info in info_list:
  33         ginfo = galaxy_info.get(info, False)
  34         if ginfo:
  35             if info in str_info_list and not isinstance(ginfo, str):
  36                 yield '{info} should be a string'.format(info=info)
  37             elif info == 'platforms':
  38                 for err in _platform_info_errors_itr(ginfo):
  39                     yield err
  40         else:
  41             yield 'Role info should contain {info}'.format(info=info)
  42 
  43 
  44 class MetaMainHasInfoRule(AnsibleLintRule):
  45     id = '701'
  46     shortdesc = 'meta/main.yml should contain relevant info'
  47     str_info = META_STR_INFO
  48     info = META_INFO
  49     description = (
  50         'meta/main.yml should contain: ``{}``'.format(', '.join(info))
  51     )
  52     severity = 'HIGH'
  53     tags = ['metadata']
  54     version_added = 'v4.0.0'
  55 
  56     def matchplay(self, file, data):
  57         if file['type'] != 'meta':
  58             return False
  59 
  60         meta = {'meta/main.yml': data}
  61         galaxy_info = data.get('galaxy_info', False)
  62         if galaxy_info:
  63             return [(meta, err) for err
  64                     in _galaxy_info_errors_itr(galaxy_info)]
  65 
  66         return [(meta, "No 'galaxy_info' found")]
  67
  [end of lib/ansiblelint/rules/MetaMainHasInfoRule.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/lib/ansiblelint/rules/MetaMainHasInfoRule.py b/lib/ansiblelint/rules/MetaMainHasInfoRule.py
  --- a/lib/ansiblelint/rules/MetaMainHasInfoRule.py
  +++ b/lib/ansiblelint/rules/MetaMainHasInfoRule.py
  @@ -57,6 +57,11 @@
           if file['type'] != 'meta':
               return False
   
  +        # since Ansible 2.10 we can add a meta/requirements.yml but
  +        # we only want to match on meta/main.yml
  +        if not file['path'].endswith('/main.yml'):
  +            return False
  +
           meta = {'meta/main.yml': data}
           galaxy_info = data.get('galaxy_info', False)
           if galaxy_info:
  
verification_info: {"golden_diff": "diff --git a/lib/ansiblelint/rules/MetaMainHasInfoRule.py b/lib/ansiblelint/rules/MetaMainHasInfoRule.py\n--- a/lib/ansiblelint/rules/MetaMainHasInfoRule.py\n+++ b/lib/ansiblelint/rules/MetaMainHasInfoRule.py\n@@ -57,6 +57,11 @@\n         if file['type'] != 'meta':\n             return False\n \n+        # since Ansible 2.10 we can add a meta/requirements.yml but\n+        # we only want to match on meta/main.yml\n+        if not file['path'].endswith('/main.yml'):\n+            return False\n+\n         meta = {'meta/main.yml': data}\n         galaxy_info = data.get('galaxy_info', False)\n         if galaxy_info:\n", "issue": "[701] No 'galaxy_info' found results in meta/requirements.yml file\n### Summary\r\n\r\nansible-lint reporting `[701] No 'galaxy_info' found` in my `meta/requirements.yml`, a file that unlike `meta/main.yml` does not (to my knowledge) support a `galaxy_info` field.\r\n\r\n##### Issue Type\r\n\r\n- Bug Report\r\n\r\n##### Ansible and Ansible Lint details\r\n<!--- Paste verbatim output between tripple backticks -->\r\n```console (paste below)\r\n$ ansible --version\r\nansible 2.10.1\r\n\r\n$ ansible-lint --version\r\nansible-lint 4.3.5\r\n```\r\n\r\n- ansible installation method: pipenv (pip)\r\n- ansible-lint installation method: pipenv (pip)\r\n\r\n##### OS / ENVIRONMENT\r\nMacOS 10.15.7 (Catalina Latest)\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\nUsing this `meta/requirements.yml`\r\n```bash\r\n---\r\n\r\n# insert third party deps here. download with:\r\n# ansible-galaxy install -r requirements.yml\r\n# https://docs.ansible.com/ansible/galaxy.html\r\n\r\n- name: singleplatform-eng.users\r\n  version: v1.2.6\r\n\r\n- name: weareinteractive.sudo\r\n  version: 1.14.1\r\n\r\n- name: geerlingguy.fluentd\r\n  version: 1.1.0\r\n```\r\n\r\nNote that `meta/main.yml` does include `galaxy_info`, but does not include as dependencies, the roles listed in requirements.yml. This is purposeful because I'm choosing `meta/requirements.yml` instead of `meta/main.yml` because I prefer the workflow and do not want the roles running first, as they do when in `meta/main.yml`.  I'm following the previously linked user-guide on this topic.\r\n\r\nTo reproduce, I simply run ansible-lint directly or via molecule.\r\n\r\n##### Desired Behaviour\r\n\r\nI would expect ansible-lint not to flag these as issues... unless I'm completely misunderstanding the finding and misreading the documentation associated with this rule.\r\n\r\n##### Actual Behaviour\r\n\r\n\r\nBelow are the ansible-lint results when run on my role.\r\n```bash\r\n$ ansible-lint\r\n[701] No 'galaxy_info' found\r\nmeta/requirements.yml:7\r\n{'meta/main.yml': {'name': 'singleplatform-eng.users', 'version': 'v1.2.6', '__line__': 7, '__file__': '/Users/tmichael/orgs/tmb/ansible_roles/base/meta/requirements.yml', 'skipped_rules': []}}\r\n\r\n[701] No 'galaxy_info' found\r\nmeta/requirements.yml:10\r\n{'meta/main.yml': {'name': 'weareinteractive.sudo', 'version': '1.14.1', '__line__': 10, '__file__': '/Users/tmichael/orgs/tmb/ansible_roles/base/meta/requirements.yml'}}\r\n\r\n[701] No 'galaxy_info' found\r\nmeta/requirements.yml:13\r\n{'meta/main.yml': {'name': 'geerlingguy.fluentd', 'version': '1.1.0', '__line__': 13, '__file__': '/Users/tmichael/orgs/tmb/ansible_roles/base/meta/requirements.yml'}}\r\n```\n", "before_files": [{"content": "# Copyright (c) 2016, Will Thames and contributors\n# Copyright (c) 2018, Ansible Project\n\nfrom ansiblelint.rules import AnsibleLintRule\n\nMETA_STR_INFO = (\n    'author',\n    'description'\n)\nMETA_INFO = tuple(list(META_STR_INFO) + [\n    'license',\n    'min_ansible_version',\n    'platforms',\n])\n\n\ndef _platform_info_errors_itr(platforms):\n    if not isinstance(platforms, list):\n        yield 'Platforms should be a list of dictionaries'\n        return\n\n    for platform in platforms:\n        if not isinstance(platform, dict):\n            yield 'Platforms should be a list of dictionaries'\n        elif 'name' not in platform:\n            yield 'Platform should contain name'\n\n\ndef _galaxy_info_errors_itr(galaxy_info,\n                            info_list=META_INFO,\n                            str_info_list=META_STR_INFO):\n    for info in info_list:\n        ginfo = galaxy_info.get(info, False)\n        if ginfo:\n            if info in str_info_list and not isinstance(ginfo, str):\n                yield '{info} should be a string'.format(info=info)\n            elif info == 'platforms':\n                for err in _platform_info_errors_itr(ginfo):\n                    yield err\n        else:\n            yield 'Role info should contain {info}'.format(info=info)\n\n\nclass MetaMainHasInfoRule(AnsibleLintRule):\n    id = '701'\n    shortdesc = 'meta/main.yml should contain relevant info'\n    str_info = META_STR_INFO\n    info = META_INFO\n    description = (\n        'meta/main.yml should contain: ``{}``'.format(', '.join(info))\n    )\n    severity = 'HIGH'\n    tags = ['metadata']\n    version_added = 'v4.0.0'\n\n    def matchplay(self, file, data):\n        if file['type'] != 'meta':\n            return False\n\n        meta = {'meta/main.yml': data}\n        galaxy_info = data.get('galaxy_info', False)\n        if galaxy_info:\n            return [(meta, err) for err\n                    in _galaxy_info_errors_itr(galaxy_info)]\n\n        return [(meta, \"No 'galaxy_info' found\")]\n", "path": "lib/ansiblelint/rules/MetaMainHasInfoRule.py"}]}