[Lldb-commits] [PATCH] D131304: [lldb] Remove uses of six module (NFC)
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 5 16:02:21 PDT 2022
mib accepted this revision.
mib added a comment.
This revision is now accepted and ready to land.
Very cool! Thanks for taking care of this! LGTM with the 2 comments and assuming the test suite runs fine :)
================
Comment at: lldb/examples/python/scripted_process/scripted_process.py:5
- at six.add_metaclass(ABCMeta)
-class ScriptedProcess:
+class ScriptedProcess(metaclass=ABCMeta):
----------------
nit: no need to specify `metaclass=ABCMeta`, it can just be `ScriptedProcess(ABC)`
================
Comment at: lldb/examples/python/scripted_process/scripted_process.py:194
- at six.add_metaclass(ABCMeta)
-class ScriptedThread:
+class ScriptedThread(metaclass=ABCMeta):
----------------
ditto
================
Comment at: lldb/packages/Python/lldbsuite/test/lldbtest.py:2278-2281
+ assert not isinstance(patterns, str), \
"patterns must be a collection of strings"
- assert not isinstance(substrs, six.string_types), \
+ assert not isinstance(substrs, str), \
"substrs must be a collection of strings"
----------------
kastiglione wrote:
> this function had a parameter named `str`, which shadowed `builtin.str`. As a fix, in this file I renamed all variables named `str` to `string`.
nit: If you feel like it, may be you can split everything related to the `str`-> `string` refactor into a separate since it's orthogonal to removing `six`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131304/new/
https://reviews.llvm.org/D131304
More information about the lldb-commits
mailing list