google/slo-generator

๐Ÿ› [BUG] - `make lint` fails with the latest version of `pytype`

Closed this issue ยท 1 comments

SLO Generator Version

v2.3.3

Python Version

3.9

What happened?

The latest version of pytype (https://github.com/google/pytype/releases/tag/2023.01.17) supports configuring the tool through pyproject.toml. However, it drops the support of setup.cfg at the same time. As a result, pytype fails with:

pytype
usage: pytype [options] input [input ...]
pytype: error: Need an input.

because the module name is currently configured in setup.cfg:

[pytype]
inputs = slo_generator

What did you expect?

make lint and pytest should complete successfully, even when no module name is provided.

Screenshots

![DESCRIPTION](LINK.png)

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Upon fixing this issue, safety fails after reporting a vulnerability with setuptools:

+====================================================================================================================+
 VULNERABILITIES FOUND 
+====================================================================================================================+

-> Vulnerability found in setuptools version 58.1.0
   Vulnerability ID: 52495
   Affected spec: <65.5.1
   ADVISORY: Setuptools 65.5.1 includes a fix for CVE-2022-40897: Python Packaging Authority (PyPA) setuptools
   before 65.5.1 allows remote attackers to cause a denial of service via HTML in a crafted package or custom...
   CVE-2022-40897
   For more information, please visit https://pyup.io/v/52495/f17

 Scan was completed. 1 vulnerability was found. 

Solution: update setuptools to 65.5.1 in the same PR so CI tests complete successfully. Run pip install -U setuptools locally on your machine to get the latest version of the package (66.1.1 at the time of writing).