[Mlir-commits] [clang] [compiler-rt] [libcxx] [lld] [lldb] [llvm] [mlir] [polly] python: use raw strings for regex (PR #105990)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Aug 26 09:06:03 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r 1193f7d6487d2d94009f8d8d27da3907136482b9...e9ffeeaf7a0bf70c58a04315e451ba4553765586 .github/workflows/version-check.py clang/docs/tools/dump_ast_matchers.py clang/test/Analysis/check-analyzer-fixit.py compiler-rt/lib/asan/scripts/asan_symbolize.py cross-project-tests/debuginfo-tests/dexter/dex/command/ParseCommand.py cross-project-tests/lit.cfg.py libcxx/utils/synchronize_csv_status_files.py lld/test/MachO/tools/validate-unwind-info.py lld/utils/benchmark.py lldb/examples/python/crashlog.py lldb/examples/python/delta.py lldb/examples/python/gdbremote.py lldb/examples/python/jump.py lldb/examples/python/performance.py lldb/examples/python/symbolication.py lldb/packages/Python/lldbsuite/test/lldbpexpect.py lldb/packages/Python/lldbsuite/test/test_runner/process_control.py lldb/test/API/commands/command/backticks/TestBackticksInAlias.py lldb/test/API/commands/expression/memory-allocation/TestMemoryAllocSettings.py lldb/test/API/commands/expression/test/TestExprs.py lldb/test/API/commands/gui/expand-threads-tree/TestGuiExpandThreadsTree.py lldb/test/API/commands/help/TestHelp.py lldb/test/API/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py lldb/test/API/commands/register/register/TestRegistersUnavailable.py lldb/test/API/commands/register/register/register_command/TestRegisters.py lldb/test/API/commands/settings/TestSettings.py lldb/test/API/commands/target/basic/TestTargetCommand.py lldb/test/API/commands/target/dump-separate-debug-info/dwo/TestDumpDwo.py lldb/test/API/commands/target/dump-separate-debug-info/oso/TestDumpOso.py lldb/test/API/commands/trace/TestTraceDumpInfo.py lldb/test/API/commands/trace/TestTraceTSC.py lldb/test/API/driver/quit_speed/TestQuitWithProcess.py lldb/test/API/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py lldb/test/API/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py lldb/test/API/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py lldb/test/API/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSContainer.py lldb/test/API/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/unordered/TestDataFormatterGenericUnordered.py lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py lldb/test/API/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py lldb/test/API/functionalities/gdb_remote_client/TestXMLRegisterFlags.py lldb/test/API/functionalities/memory-region/TestMemoryRegion.py lldb/test/API/functionalities/target_var/TestTargetVar.py lldb/test/API/iohandler/completion/TestIOHandlerCompletion.py lldb/test/API/lang/c/enum_types/TestEnumTypes.py lldb/test/API/lang/c/function_types/TestFunctionTypes.py lldb/test/API/lang/c/register_variables/TestRegisterVariables.py lldb/test/API/lang/c/set_values/TestSetValues.py lldb/test/API/lang/c/strings/TestCStrings.py lldb/test/API/lang/c/tls_globals/TestTlsGlobals.py lldb/test/API/lang/cpp/char1632_t/TestChar1632T.py lldb/test/API/lang/cpp/class_static/TestStaticVariables.py lldb/test/API/lang/cpp/class_types/TestClassTypes.py lldb/test/API/lang/cpp/dynamic-value/TestDynamicValue.py lldb/test/API/lang/cpp/namespace/TestNamespace.py lldb/test/API/lang/cpp/signed_types/TestSignedTypes.py lldb/test/API/lang/cpp/unsigned_types/TestUnsignedTypes.py lldb/test/API/lang/mixed/TestMixedLanguages.py lldb/test/API/lang/objc/foundation/TestObjCMethods.py lldb/test/API/lang/objc/foundation/TestObjCMethodsNSArray.py lldb/test/API/lang/objc/foundation/TestObjCMethodsNSError.py lldb/test/API/lang/objc/foundation/TestObjCMethodsString.py lldb/test/API/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py lldb/test/API/lang/objcxx/objc-builtin-types/TestObjCBuiltinTypes.py lldb/test/API/linux/aarch64/mte_core_file/TestAArch64LinuxMTEMemoryTagCoreFile.py lldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py lldb/test/API/linux/aarch64/mte_tag_faults/TestAArch64LinuxMTEMemoryTagFaults.py lldb/test/API/linux/aarch64/tagged_memory_region/TestAArch64LinuxTaggedMemoryRegion.py lldb/test/API/macosx/add-dsym/TestAddDsymDownload.py lldb/test/API/macosx/lc-note/firmware-corefile/TestFirmwareCorefiles.py lldb/test/API/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py lldb/test/API/macosx/lc-note/multiple-binary-corefile/TestMultipleBinaryCorefile.py lldb/test/API/macosx/simulator/TestSimulatorPlatform.py lldb/test/API/macosx/skinny-corefile/TestSkinnyCorefile.py lldb/test/API/python_api/address_range/TestAddressRange.py lldb/test/API/python_api/target-arch-from-module/TestTargetArchFromModule.py lldb/test/API/source-manager/TestSourceManager.py lldb/test/API/tools/lldb-server/TestGdbRemoteModuleInfo.py lldb/test/API/tools/lldb-server/TestPtyServer.py lldb/test/API/tools/lldb-server/registers-target-xml-reading/TestGdbRemoteTargetXmlPacket.py lldb/test/API/types/AbstractBase.py lldb/utils/lui/sourcewin.py llvm/test/CodeGen/NVPTX/wmma.py llvm/tools/opt-viewer/opt-viewer.py llvm/utils/DSAclean.py llvm/utils/DSAextract.py llvm/utils/add_argument_names.py llvm/utils/convert-constraint-log-to-z3.py llvm/utils/extract_symbols.py llvm/utils/extract_vplan.py llvm/utils/git/github-automation.py llvm/utils/indirect_calls.py llvm/utils/relative_lines.py llvm/utils/update_test_prefix.py mlir/utils/spirv/gen_spirv_dialect.py polly/test/update_check.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- libcxx/utils/synchronize_csv_status_files.py 2024-08-25 15:52:29.000000 +0000
+++ libcxx/utils/synchronize_csv_status_files.py 2024-08-26 16:05:28.875052 +0000
@@ -282,11 +282,13 @@
# something must be wrong.
if paper.status < gh.status:
results.append(gh.for_printing())
continue
elif paper.status != gh.status:
- print(rf"We found a CSV row and a Github issue with different statuses:\nrow: {row}\Github issue: {gh}")
+ print(
+ rf"We found a CSV row and a Github issue with different statuses:\nrow: {row}\Github issue: {gh}"
+ )
results.append(row)
return results
CSV_FILES_TO_SYNC = [
--- lldb/test/API/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py 2024-08-25 15:52:29.000000 +0000
+++ lldb/test/API/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py 2024-08-26 16:05:31.141160 +0000
@@ -102,11 +102,13 @@
'frame variable int_array --summary-string "${*var[0-1]}"', substrs=["3"]
)
self.runCmd("type summary clear")
- self.runCmd(r'type summary add --summary-string "${var[0-1]}" -x "int\[[0-9]\]"')
+ self.runCmd(
+ r'type summary add --summary-string "${var[0-1]}" -x "int\[[0-9]\]"'
+ )
self.expect("frame variable int_array", substrs=["1,2"])
self.runCmd('type summary add --summary-string "${var[0-1]}" "int[]"')
--- lldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py 2024-08-25 15:52:29.000000 +0000
+++ lldb/test/API/linux/aarch64/mte_tag_access/TestAArch64LinuxMTEMemoryTagAccess.py 2024-08-26 16:05:32.453203 +0000
@@ -522,11 +522,13 @@
)
# End of range is untagged
self.expect(
'memory read mte_buf+page_size-16 mte_buf+page_size+16 -f "x" -l 1 -s 16 --show-tags',
- patterns=[r"0x[0-9A-Fa-f]+f0: 0x0+ \(tag: 0xf\)\n" "0x[0-9A-Fa-f]+00: 0x0+"],
+ patterns=[
+ r"0x[0-9A-Fa-f]+f0: 0x0+ \(tag: 0xf\)\n" "0x[0-9A-Fa-f]+00: 0x0+"
+ ],
)
# The smallest MTE range we can get is a single page so we just check
# parts of this result. Where we read from before the tagged page to after it.
# Add --force here because we're reading just over 4k.
--- lldb/test/API/linux/aarch64/tagged_memory_region/TestAArch64LinuxTaggedMemoryRegion.py 2024-08-25 15:52:29.000000 +0000
+++ lldb/test/API/linux/aarch64/tagged_memory_region/TestAArch64LinuxTaggedMemoryRegion.py 2024-08-26 16:05:32.513656 +0000
@@ -37,11 +37,12 @@
substrs=["stopped", "stop reason = breakpoint"],
)
# Despite the non address bits we should find a region
self.expect(
- "memory region the_page", patterns=[r"\[0x[0-9A-Fa-f]+-0x[0-9A-Fa-f]+\) r-x"]
+ "memory region the_page",
+ patterns=[r"\[0x[0-9A-Fa-f]+-0x[0-9A-Fa-f]+\) r-x"],
)
# Check that the usual error message is displayed after repeating
# the command until the last region.
self.runCmd("memory region 0")
@@ -66,7 +67,8 @@
self.runCmd("memory region")
# This should not error, since the user supplied address overrides
# the previous end address.
self.expect(
- "memory region the_page", patterns=[r"\[0x[0-9A-Fa-f]+-0x[0-9A-Fa-f]+\) r-x"]
+ "memory region the_page",
+ patterns=[r"\[0x[0-9A-Fa-f]+-0x[0-9A-Fa-f]+\) r-x"],
)
--- polly/test/update_check.py 2024-08-25 15:52:29.000000 +0000
+++ polly/test/update_check.py 2024-08-26 16:05:34.430205 +0000
@@ -220,11 +220,16 @@
else:
yield set()
line = i.__next__()
-replrepl = {"{{": "{{[{][{]}}", "}}": "{{[}][}]}}", "[[": r"{{\[\[}}", "]]": r"{{\]\]}}"}
+replrepl = {
+ "{{": "{{[{][{]}}",
+ "}}": "{{[}][}]}}",
+ "[[": r"{{\[\[}}",
+ "]]": r"{{\]\]}}",
+}
replre = re.compile("|".join(re.escape(k) for k in replrepl.keys()))
def main():
parser = argparse.ArgumentParser(description="Update CHECK lines")
``````````
</details>
https://github.com/llvm/llvm-project/pull/105990
More information about the Mlir-commits
mailing list