You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/07/28 03:10:59 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #17273: Switch to 'smbprotocol' library

uranusjr commented on a change in pull request #17273:
URL: https://github.com/apache/airflow/pull/17273#discussion_r677940668



##########
File path: airflow/providers/samba/hooks/samba.py
##########
@@ -16,12 +16,43 @@
 # specific language governing permissions and limitations
 # under the License.
 
-import os
+from functools import wraps
+from logging import getLogger
+from shutil import copyfileobj
+from typing import Optional
 
-from smbclient import SambaClient
+from smbclient import (
+    getxattr,
+    link,
+    listdir,
+    listxattr,
+    lstat,
+    makedirs,
+    mkdir,
+    open_file,
+    readlink,
+    register_session,
+    remove,
+    removedirs,
+    removexattr,
+    rename,
+    replace,
+    rmdir,
+    scandir,
+    setxattr,
+    stat,
+    stat_volume,
+    symlink,
+    truncate,
+    unlink,
+    utime,
+    walk,
+)

Review comment:
       It’s probably better to use `import smbclient` and namespace everything under it. There are quite several function names that could be confusing an prone to coding errors (e.g. to those in `os`).




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org