Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

The builtin 'file' was removed in Python 3 #126

Open
cclauss opened this issue Sep 25, 2018 · 0 comments
Open

The builtin 'file' was removed in Python 3 #126

cclauss opened this issue Sep 25, 2018 · 0 comments

Comments

@cclauss
Copy link

cclauss commented Sep 25, 2018

flake8 testing of https://github.com/google/python-adb on Python 3.6.3

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./adb/adb_commands.py:295:36: F821 undefined name 'file'
        elif isinstance(dest_file, file):
                                   ^
./adb/common.py:207:48: F821 undefined name 'SYSFS_PORT_SPLIT_RE'
            port_path = [int(part) for part in SYSFS_PORT_SPLIT_RE.split(port_path)]
                                               ^
./adb/filesync_protocol.py:142:87: F821 undefined name 'file'
            total_bytes = os.fstat(datafile.fileno()).st_size if isinstance(datafile, file) else -1
                                                                                      ^
3       F821 undefined name 'file'
3
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant