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

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

@cclauss

Description

@cclauss

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions