Changeset 1722:2500d9b34941


Ignore:
Timestamp:
Dec 26, 2018, 7:49:04 PM (5 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Remove obsolete features

Remove detection of "invalid" features that are either ancient or no
longer invalid. "Ancient" is the use of `xreadlines`; this should
hardly be used anymore nowadays. "No longer invalid" are detections of
byte strings starting with quotes. In Python 3, these are unicode
strings, and it's unlikely that code _deliberately_ uses actual byte
strings starting with `b`.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • find_invalid_code.py

    r1718 r1722  
    5656                 r"\bftp_stat\b"),
    5757  InvalidFeature("Possible use(s) of FTPHost.file",
    58                  r"{0}\.file\(".format(HOST_REGEX)),
    59   InvalidFeature("Possible use(s) of FTPHost.open with text mode",
    60                  r"{0}\.open\(.*[\"'](r|w)t?[\"']".format(HOST_REGEX)),
    61   InvalidFeature("Possible use(s) of byte string in ignores_line",
    62                  r"\bdef ignores_line\("),
    63   InvalidFeature("Possible use(s) of byte string in parse_line",
    64                  r"\bdef parse_line\("),
    65   InvalidFeature("Possible use(s) download with text mode",
    66                  r"{0}\.download(_if_newer)?\(".format(HOST_REGEX)),
    67   InvalidFeature("Possible use(s) upload with text mode",
    68                  r"{0}\.upload(_if_newer)?\(".format(HOST_REGEX)),
    69   InvalidFeature("Possible use(s) of xreadline method of FTP file objects",
    70                  r"\.\s*?xreadlines\b"),
     58                 r"{0}\.file\(".format(HOST_REGEX))
    7159]
    7260
Note: See TracChangeset for help on using the changeset viewer.