<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Andrew,</p>
    <p><a class="moz-txt-link-freetext" href="https://stackoverflow.com/questions/75591296/entrypoints-object-has-no-attribute-get-during-running-pre-commit">https://stackoverflow.com/questions/75591296/entrypoints-object-has-no-attribute-get-during-running-pre-commit</a>
      would suggest that we should perhaps update the flake8 version in
      .pre-commit-config.yaml at the root of the GDAL source tree.</p>
    <p>Can you give a try to <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/10163">https://github.com/OSGeo/gdal/pull/10163</a> ?</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 07/06/2024 à 19:36, Andrew Bell via
      gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CACJ51z1GCVM6sebOPkcd+Vb3CwBB7tWdWaYuEm4SFC5eH-oTzw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>I'm getting an error when flake8 runs as a pre-commit hook
          and it won't allow me to commit code. My understanding was
          that the pre-commit stuff was supposed to make sure the proper
          versions were found. Ideas?<br>
          <br>
          <div>(gdal) [viewshed-oor] $ git commit<br>
black....................................................................Passed<br>
isort....................................................................Passed<br>
flake8...................................................................Failed<br>
            - hook id: flake8<br>
            - exit code: 1<br>
            <br>
            Traceback (most recent call last):<br>
              File
"/Users/abell/.cache/pre-commit/repowsfp6jbc/py_env-python3.12/bin/flake8",
            line 8, in <module><br>
                sys.exit(main())<br>
                         ^^^^^^<br>
              File
"/Users/abell/.cache/pre-commit/repowsfp6jbc/py_env-python3.12/lib/python3.12/site-packages/flake8/main/cli.py",
            line 22, in main<br>
                app.run(argv)<br>
              File
"/Users/abell/.cache/pre-commit/repowsfp6jbc/py_env-python3.12/lib/python3.12/site-packages/flake8/main/application.py",
            line 363, in run<br>
                self._run(argv)<br>
              File
"/Users/abell/.cache/pre-commit/repowsfp6jbc/py_env-python3.12/lib/python3.12/site-packages/flake8/main/application.py",
            line 350, in _run<br>
                self.initialize(argv)<br>
              File
"/Users/abell/.cache/pre-commit/repowsfp6jbc/py_env-python3.12/lib/python3.12/site-packages/flake8/main/application.py",
            line 330, in initialize<br>
                self.find_plugins(config_finder)<br>
              File
"/Users/abell/.cache/pre-commit/repowsfp6jbc/py_env-python3.12/lib/python3.12/site-packages/flake8/main/application.py",
            line 153, in find_plugins<br>
                self.check_plugins =
            plugin_manager.Checkers(local_plugins.extension)<br>
                                   
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br>
              File
"/Users/abell/.cache/pre-commit/repowsfp6jbc/py_env-python3.12/lib/python3.12/site-packages/flake8/plugins/manager.py",
            line 356, in __init__<br>
                self.manager = PluginManager(<br>
                               ^^^^^^^^^^^^^^<br>
              File
"/Users/abell/.cache/pre-commit/repowsfp6jbc/py_env-python3.12/lib/python3.12/site-packages/flake8/plugins/manager.py",
            line 238, in __init__<br>
                self._load_entrypoint_plugins()<br>
              File
"/Users/abell/.cache/pre-commit/repowsfp6jbc/py_env-python3.12/lib/python3.12/site-packages/flake8/plugins/manager.py",
            line 254, in _load_entrypoint_plugins<br>
                eps =
            importlib_metadata.entry_points().get(self.namespace, ())<br>
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br>
            AttributeError: 'EntryPoints' object has no attribute 'get'<br>
          </div>
          <div><br>
          </div>
          <span class="gmail_signature_prefix">--</span></div>
        <div>
          <div dir="ltr" class="gmail_signature"
            data-smartmail="gmail_signature">Andrew Bell<br>
            <a href="mailto:andrew.bell.ia@gmail.com" target="_blank"
              moz-do-not-send="true" class="moz-txt-link-freetext">andrew.bell.ia@gmail.com</a></div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>