audk/BaseTools/Source/Python/Ecc
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
..
MetaFileWorkspace BaseTools: Fix old python2 idioms 2018-06-27 16:33:27 +08:00
Xml BaseTools: Fix old python2 idioms 2018-06-27 16:33:27 +08:00
C.g Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00
CLexer.py Sync BaseTool trunk (version r2649) into EDKII BaseTools. 2014-01-27 05:23:15 +00:00
CParser.py BaseTools: Adjust the spaces around commas and colons 2018-06-27 16:33:25 +08:00
Check.py BaseTools: Remove the old python "not-equal" 2018-06-27 16:33:22 +08:00
CodeFragment.py Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00
CodeFragmentCollector.py BaseTools: Refactor python print statements 2018-06-27 16:33:21 +08:00
Configuration.py BaseTools: Refactor python print statements 2018-06-27 16:33:21 +08:00
Database.py There is a limitation on WINDOWS OS for the length of entire file path can’t be larger than 255. There is an OS API provided by Microsoft to add “\\?\” before the path header to support the long file path. Enable this feature on basetools. 2014-08-15 03:06:48 +00:00
Ecc.py BaseTools: Rename String to StringUtils. 2018-05-28 13:05:00 +08:00
EccGlobalData.py This patch is going to: 2014-08-25 01:16:34 +00:00
EccToolError.py BaseTools/ECC: Add a new checkpoint 2017-04-13 10:55:57 +08:00
Exception.py BaseTools: Refactor python print statements 2018-06-27 16:33:21 +08:00
FileProfile.py There is a limitation on WINDOWS OS for the length of entire file path can’t be larger than 255. There is an OS API provided by Microsoft to add “\\?\” before the path header to support the long file path. Enable this feature on basetools. 2014-08-15 03:06:48 +00:00
MetaDataParser.py BaseTools: Update ECC tool to support multiple workspaces 2015-10-08 09:28:51 +00:00
ParserWarning.py Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00
__init__.py Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00
c.py BaseTools: Refactor python print statements 2018-06-27 16:33:21 +08:00
config.ini BaseTools/ECC: Add a new checkpoint 2017-04-13 10:55:57 +08:00
exception.xml Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00