audk/BaseTools/Source/Python/UPT
Gary Lin 0d1f5b2b5d BaseTools: Fix old python2 idioms
Based on "futurize -f lib2to3.fixes.fix_idioms"

* Change some type comparisons to isinstance() calls:
    type(x) == T -> isinstance(x, T)
    type(x) is T -> isinstance(x, T)
    type(x) != T -> not isinstance(x, T)
    type(x) is not T -> not isinstance(x, T)

* Change "while 1:" into "while True:".

* Change both

    v = list(EXPR)
    v.sort()
    foo(v)

and the more general

    v = EXPR
    v.sort()
    foo(v)

into

    v = sorted(EXPR)
    foo(v)

Contributed-under: TianoCore Contribution Agreement 1.1
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
2018-06-27 16:33:27 +08:00
..
Core BaseTools: Migrate to the new octal literal 2018-06-27 16:33:27 +08:00
Dll Sync BaseTools Branch (version r2271) to EDKII main trunk. 2011-08-26 07:46:26 +00:00
GenMetaFile BaseTools: Fix old python2 idioms 2018-06-27 16:33:27 +08:00
Library BaseTools: Fix old python2 idioms 2018-06-27 16:33:27 +08:00
Logger BaseTools: Remove equality operator with None 2018-03-30 08:25:13 +08:00
Object BaseTools: Remove the deprecated hash_key() 2018-06-27 16:33:23 +08:00
Parser BaseTools/UPT: Update the import statement to use StringUtils 2018-06-11 15:31:49 +08:00
PomAdapter BaseTools: Fix old python2 idioms 2018-06-27 16:33:27 +08:00
UnitTest BaseTools: Refactor python print statements 2018-06-27 16:33:21 +08:00
Xml BaseTools: Adjust the spaces around commas and colons 2018-06-27 16:33:25 +08:00
BuildVersion.py BaseTools: Clear build versions to sync with buildtools/BaseTools 2014-07-25 21:10:33 +00:00
InstallPkg.py BaseTools: Refactor python except statements 2018-06-27 16:31:30 +08:00
InventoryWs.py BaseTools: Refactor python except statements 2018-06-27 16:31:30 +08:00
Makefile Sync BaseTool trunk (version r2423) into EDKII BaseTools. The change mainly includes: 2011-11-25 06:21:03 +00:00
MkPkg.py BaseTools: Refactor python except statements 2018-06-27 16:31:30 +08:00
ReplacePkg.py BaseTools: Refactor python except statements 2018-06-27 16:31:30 +08:00
RmPkg.py BaseTools: Refactor python except statements 2018-06-27 16:31:30 +08:00
TestInstall.py BaseTools: Refactor python except statements 2018-06-27 16:31:30 +08:00
UPT.py BaseTools: Adjust the spaces around commas and colons 2018-06-27 16:33:25 +08:00