summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-04-24 18:21:53 +0200
committerJulian Andres Klode <jak@debian.org>2009-04-24 18:21:53 +0200
commit5729c2d5ad92a090cea8648dcddc181a86c09132 (patch)
tree3f8ed89ecb266f1ab11edd232bfe34c2831165df
parent9f0511895a1a6a1d82e498a609cb4f237fa9b60c (diff)
downloadpython-apt-5729c2d5ad92a090cea8648dcddc181a86c09132.tar.gz
* utils/migrate-0.8.py: Add a warning that there may be false positives.
-rwxr-xr-xutils/migrate-0.8.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/utils/migrate-0.8.py b/utils/migrate-0.8.py
index 0986fb21..99adf652 100755
--- a/utils/migrate-0.8.py
+++ b/utils/migrate-0.8.py
@@ -123,7 +123,8 @@ def find_deprecated_py():
if not isinstance(cls, types.TypeType):
new.add(clsname)
continue
- new.update(clsname + '.' + name for name in dir(cls)) # Attributes/Methods
+ # Attributes/Methods
+ new.update(clsname + '.' + name for name in dir(cls))
for mname in sys.modules.keys():
if not mname in empty:
@@ -158,7 +159,6 @@ def find_occurences(all_old, files):
words = defaultdict(lambda: set())
for i in ast.walk(ast.parse(open(fname).read())):
-
if isinstance(i, _ast.ImportFrom):
for alias in i.names:
if alias.name in all_old:
@@ -178,6 +178,9 @@ def find_occurences(all_old, files):
print __doc__.split("\n")[0]
print
+print fill('Information: Please verify that the results are correct before '
+ 'you modify any code, because there may be false positives.', 79)
+print
if color:
print fill('Information: The color is not always correct, because we '
'simply highlight the matched words (like grep).', 79)
@@ -185,8 +188,6 @@ if color:
all_old = find_deprecated_cpp() | find_deprecated_py()
-
-
files = set()
for path in sys.argv[1:]:
if not os.path.exists(path):