matrix-org / sygnal

Sygnal: reference Push Gateway for Matrix
Apache License 2.0
155 stars 140 forks source link

Improve static type checking #333

Closed dklimpel closed 1 year ago

dklimpel commented 1 year ago

Signed-off-by: Dirk Klimpel dirk@klimpel.org

dklimpel commented 1 year ago

I am not sure if this error is realted to this PR:

check_codestyle: commands[0]> flake8 sygnal/ tests/ setup.py scripts-dev/
Traceback (most recent call last):
  File "/home/runner/work/sygnal/sygnal/.tox/check_codestyle/bin/flake8", line 8, in <module>
    sys.exit(main())
  File "/home/runner/work/sygnal/sygnal/.tox/check_codestyle/lib/python3.7/site-packages/flake8/main/cli.py", line 22, in main
    app.run(argv)
  File "/home/runner/work/sygnal/sygnal/.tox/check_codestyle/lib/python3.7/site-packages/flake8/main/application.py", line 363, in run
    self._run(argv)
  File "/home/runner/work/sygnal/sygnal/.tox/check_codestyle/lib/python3.7/site-packages/flake8/main/application.py", line [35](https://github.com/matrix-org/sygnal/actions/runs/4762765542/jobs/8465376134?pr=333#step:5:36)0, in _run
    self.initialize(argv)
check_codestyle: exit 1 (0.15 seconds) /home/runner/work/sygnal/sygnal> flake8 sygnal/ tests/ setup.py scripts-dev/ pid=1958
.pkg: _exit> python /opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  File "/home/runner/work/sygnal/sygnal/.tox/check_codestyle/lib/python3.7/site-packages/flake8/main/application.py", line 330, in initialize
    self.find_plugins(config_finder)
  File "/home/runner/work/sygnal/sygnal/.tox/check_codestyle/lib/python3.7/site-packages/flake8/main/application.py", line 153, in find_plugins
    self.check_plugins = plugin_manager.Checkers(local_plugins.extension)
  File "/home/runner/work/sygnal/sygnal/.tox/check_codestyle/lib/python3.7/site-packages/flake8/plugins/manager.py", line 357, in __init__
    self.namespace, local_plugins=local_plugins
  File "/home/runner/work/sygnal/sygnal/.tox/check_codestyle/lib/python3.7/site-packages/flake8/plugins/manager.py", line 2[38](https://github.com/matrix-org/sygnal/actions/runs/4762765542/jobs/8465376134?pr=333#step:5:39), in __init__
    self._load_entrypoint_plugins()
  File "/home/runner/work/sygnal/sygnal/.tox/check_codestyle/lib/python3.7/site-packages/flake8/plugins/manager.py", line 254, in _load_entrypoint_plugins
    eps = importlib_metadata.entry_points().get(self.namespace, ())
AttributeError: 'EntryPoints' object has no attribute 'get'
  check_codestyle: FAIL code 1 (40.03=setup[[39](https://github.com/matrix-org/sygnal/actions/runs/4762765542/jobs/8465376134?pr=333#step:5:40).88]+cmd[0.15] seconds)
  evaluation failed :( ([40](https://github.com/matrix-org/sygnal/actions/runs/4762765542/jobs/8465376134?pr=333#step:5:41).[40](https://github.com/matrix-org/sygnal/actions/runs/4762765542/jobs/8465376134?pr=333#step:5:41) seconds)
richvdh commented 1 year ago

I am not sure if this error is realted to this PR:

It's happening on my PR too (#334), so I guess not

dklimpel commented 1 year ago

I have seen that the pipeline also uses Python 3.7. It is EOL in 2 month.