Repository: modin-project/modin

Issue:
`flake8` CI fails
`flake8-print` `flake8` plugin released the new version and now CI fails because of print statements:
```
modin\_version.py:92:17: T201 print found.
modin\_version.py:93:17: T201 print found.
modin\_version.py:97:13: T201 print found.
modin\_version.py:104:13: T201 print found.
modin\_version.py:105:13: T201 print found.
modin\_version.py:134:9: T201 print found.
modin\_version.py:187:13: T201 print found.
modin\_version.py:204:13: T201 print found.
modin\_version.py:206:9: T201 print found.
modin\_version.py:212:17: T201 print found.
modin\_version.py:222:9: T201 print found.
modin\_version.py:247:13: T201 print found.
modin\_version.py:304:17: T201 print found.
modin\config\__main__.py:35:13: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:57:1: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:62:1: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:71:1: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:73:5: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:74:1: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:190:1: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:194:1: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:196:5: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:199:1: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:202:9: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:206:1: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:209:9: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:213:1: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:216:9: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:222:1: T201 print found.
modin\experimental\cloud\tracing\parse_rpyc_trace.py:225:9: T201 print found.
modin\experimental\core\execution\native\implementations\omnisci_on_native\df_algebra.py:269:9: T201 print found.
```
Probably these prints should be replaced with `warning.warn`s.


Discussion:
Update:
`flake8-print` changelog:
```
5.0.0 - 2022-04-30
Move namespace from T0* to T2* to avoid collision with other library using same error code.
```
So we need just change error code `T001` -> `T201`.

Resolving patch:
diff --git a/modin/config/__main__.py b/modin/config/__main__.py
--- a/modin/config/__main__.py
+++ b/modin/config/__main__.py
@@ -32,7 +32,7 @@ def print_config_help():
     for objname in sorted(globals()):
         obj = globals()[objname]
         if isinstance(obj, type) and issubclass(obj, Parameter) and not obj.is_abstract:
-            print(f"{obj.get_help()}\n\tCurrent value: {obj.get()}")  # noqa: T001
+            print(f"{obj.get_help()}\n\tCurrent value: {obj.get()}")  # noqa: T201
 
 
 def export_config_help(filename: str):
diff --git a/modin/experimental/cloud/tracing/parse_rpyc_trace.py b/modin/experimental/cloud/tracing/parse_rpyc_trace.py
--- a/modin/experimental/cloud/tracing/parse_rpyc_trace.py
+++ b/modin/experimental/cloud/tracing/parse_rpyc_trace.py
@@ -54,12 +54,12 @@ def get_syncs(items):
 items = read_log((sys.argv[1:] or ["rpyc-trace.log"])[0])
 syncs = get_syncs(items)
 
-print(  # noqa: T001
+print(  # noqa: T201
     f"total time={sum(i['timing'] for i in syncs if i['kind'] == 'recv' and i['msg'] == 'MSG_REPLY')}"
 )
 
 longs = [i for i in syncs if i["timing"] > 0.5]
-print(f'longs ({len(longs)}) time={sum(i["timing"] for i in longs)}')  # noqa: T001
+print(f'longs ({len(longs)}) time={sum(i["timing"] for i in longs)}')  # noqa: T201
 
 s_sends = [i for i in syncs if i["kind"] == "send"]
 
@@ -68,10 +68,10 @@ def get_syncs(items):
 for i in s_sends:
     buckets[i.get("req", "<REVERSE>")].append(i["args"])
 
-print("-------------------")  # noqa: T001
+print("-------------------")  # noqa: T201
 for k, v in buckets.items():
-    print(f"{k}={len(v)}")  # noqa: T001
-print("-------------------")  # noqa: T001
+    print(f"{k}={len(v)}")  # noqa: T201
+print("-------------------")  # noqa: T201
 
 sends = {
     i["seq"]: i for i in items if i["kind"] == "send" and i["msg"] == "MSG_REQUEST"
@@ -187,42 +187,42 @@ def _parse_msg(m, s=False, **kw):
         remote[got] = sent
     # remote[from_getattr_recv(grecv, False)] = from_getattr_send(gsend, False)
 
-print(f"total time getattrs={sum(x[1]['timing'] for x in getattrs)}")  # noqa: T001
+print(f"total time getattrs={sum(x[1]['timing'] for x in getattrs)}")  # noqa: T201
 
 # import pdb; pdb.set_trace()
 
-print("\n\n----[ getattr ]----")  # noqa: T001
+print("\n\n----[ getattr ]----")  # noqa: T201
 for gsend, grecv in getattrs:
-    print(f"{from_getattr_send(gsend)} --> {from_getattr_recv(grecv)}")  # noqa: T001
+    print(f"{from_getattr_send(gsend)} --> {from_getattr_recv(grecv)}")  # noqa: T201
 
 
-print("\n\n----[ hash ]----")  # noqa: T001
+print("\n\n----[ hash ]----")  # noqa: T201
 for i in syncs:
     if i.get("req", "") == "HANDLE_HASH" and i["kind"] == "send":
-        print(  # noqa: T001
+        print(  # noqa: T201
             from_hash_send(i), "-->", from_getattr_recv(responses.get(i["seq"]))
         )
 
-print("\n\n----[ str ]----")  # noqa: T001
+print("\n\n----[ str ]----")  # noqa: T201
 for i in syncs:
     if i.get("req", "") == "HANDLE_STR" and i["kind"] == "send":
-        print(  # noqa: T001
+        print(  # noqa: T201
             from_hash_send(i), "-->", from_getattr_recv(responses.get(i["seq"]))
         )
 
-print("\n\n----[ callattr ]----")  # noqa: T001
+print("\n\n----[ callattr ]----")  # noqa: T201
 for i in syncs:
     if i.get("req", "") == "HANDLE_CALLATTR" and i["kind"] == "send":
-        print(  # noqa: T001
+        print(  # noqa: T201
             from_callattr_send(i, remote=remote),
             "-->",
             from_getattr_recv(responses.get(i["seq"])),
         )
 
-print("\n\n----[ call ]----")  # noqa: T001
+print("\n\n----[ call ]----")  # noqa: T201
 for i in syncs:
     if i.get("req", "") == "HANDLE_CALL" and i["kind"] == "send":
-        print(  # noqa: T001
+        print(  # noqa: T201
             from_call_send(i, remote=remote),
             "-->",
             from_getattr_recv(responses.get(i["seq"])),
diff --git a/modin/experimental/core/execution/native/implementations/omnisci_on_native/df_algebra.py b/modin/experimental/core/execution/native/implementations/omnisci_on_native/df_algebra.py
--- a/modin/experimental/core/execution/native/implementations/omnisci_on_native/df_algebra.py
+++ b/modin/experimental/core/execution/native/implementations/omnisci_on_native/df_algebra.py
@@ -266,7 +266,7 @@ def dump(self, prefix=""):
         prefix : str, default: ''
             A prefix to add at each string of the dump.
         """
-        print(self.dumps(prefix))  # noqa: T001
+        print(self.dumps(prefix))  # noqa: T201
 
     def dumps(self, prefix=""):
         """


Test patch: