jiridanek commented on a change in pull request #1058:
URL: https://github.com/apache/qpid-dispatch/pull/1058#discussion_r584110392



##########
File path: python/qpid_dispatch_internal/display_name/display_name.py
##########
@@ -29,14 +29,10 @@
 from __future__ import absolute_import
 from __future__ import print_function
 
-
+import json
 import traceback
-from traceback import format_exc
 
-from ..router.message import Message
-
-from ..dispatch import IoAdapter, LogAdapter, LOG_INFO, LOG_ERROR, LOG_TRACE, 
LOG_STACK_LIMIT
-import json
+from qpid_dispatch_internal import dispatch

Review comment:
       I admit going this far in this particular case is somewhat gratuitous, 
but referring to imported names with `import module; module.name` imo generally 
works better overall than `from module import name; name`.

##########
File path: tests/system_tests_topology_disposition.py.in
##########
@@ -423,12 +417,6 @@ class TopologyDispositionTests (TestCase):
         if self.skip[name] :
             self.skipTest("Test skipped during development.")
 
-        try:
-            import ast

Review comment:
       ast is available everywhere since Python 2.6

##########
File path: tests/system_tests_tcp_adaptor.py
##########
@@ -61,7 +55,7 @@ class TCP_echo_server(object):
 DISABLE_SELECTOR_TESTS = False
 DISABLE_SELECTOR_REASON = ''
 try:
-    import selectors
+    import selectors  # noqa F401: 'selectors' imported but unused

Review comment:
       btw, this is the way to do line-suppressions for flake8; afaik dispatch 
did not yet have any such

##########
File path: tests/tox.ini.in
##########
@@ -96,10 +96,6 @@ ignore =
     H301,
     # H306: imports not in alphabetical order
     H306,
-    # imported but unused
-    F401,
-    # 'from proton import *' used; unable to detect undefined names
-    F403,

Review comment:
       here goes the main part, everything else is just to fix the warnings 
that creep up when this here is removed




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to