Closed ashwin9390 closed 3 months ago
Main ticket and minimal preparation for:
CP-49906: Move extauth-hook-AD.py to python3 directory
extauth-hook-AD.py
To fix : https://github.com/ashwin9390/xen-api/actions/runs/9758441405
This PR has two commits to fix the issues that prevent the move in the above build.
[PATCH 1/2] Stop testing scripts/plugins/extauth-hook-AD.py with Python2.7
Preparations for cleaning up the checker warnings in extauth-hook-AD.py:
The shebang of extauth-hook-AD.py has already been changed to Python3: Thus, stop testing it with Python3.
This drops the Python2 code coverage to 28% (below 50%). We need to allow further drops in coverage: Set the limit to 0.
[PATCH 2/2] extauth-hook-AD.py: Fix pytype warnings, clean-up pylint suppressions
pytype
pylint
pytype warnings need to be fixed before it can be moved to Python3.
@abc.abstractmethod
upn
pyright
Clean-up obsolete inheriting from object: In Python3, all classes already always inherit from object.
object
Author: Signed-off-by: Bernhard Kaindl bernhard.kaindl@cloud.com
Committed by: Signed-off-by: Ashwinh ashwin.h@cloud.com
Main ticket and minimal preparation for:
To fix : https://github.com/ashwin9390/xen-api/actions/runs/9758441405
This PR has two commits to fix the issues that prevent the move in the above build.
[PATCH 1/2] Stop testing scripts/plugins/extauth-hook-AD.py with Python2.7
Preparations for cleaning up the checker warnings in extauth-hook-AD.py:
The shebang of extauth-hook-AD.py has already been changed to Python3: Thus, stop testing it with Python3.
This drops the Python2 code coverage to 28% (below 50%). We need to allow further drops in coverage: Set the limit to 0.
[PATCH 2/2] extauth-hook-AD.py: Fix
pytype
warnings, clean-uppylint
suppressionspytype
warnings need to be fixed before it can be moved to Python3.pytype
reports the uses@abc.abstractmethod
as stray, disable.upn
: checkers (pytype
,pyright
) can't see that it is already handled OK.Clean-up obsolete inheriting from
object
: In Python3, all classes already always inherit fromobject
.Author: Signed-off-by: Bernhard Kaindl bernhard.kaindl@cloud.com
Committed by: Signed-off-by: Ashwinh ashwin.h@cloud.com