malthe commented on a change in pull request #17273:
URL: https://github.com/apache/airflow/pull/17273#discussion_r678031771
##########
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:
I have updated the code now to reflect this. I think it's rare to see
code that imports _from_ `os` and we do lose some import use tracking with this
change, but as you say there are also some benefits.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]