From f89a3e8fa18dbe0e4f57cbbb90e2603b8596ad11 Mon Sep 17 00:00:00 2001 From: rocky Date: Fri, 4 Mar 2022 05:12:44 -0500 Subject: [PATCH] Remove some 3.6ish type annotations --- uncompyle6/main.py | 4 ++-- uncompyle6/parsers/reducecheck/and_not_check.py | 2 +- uncompyle6/semantics/fragments.py | 2 +- uncompyle6/semantics/pysource.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/uncompyle6/main.py b/uncompyle6/main.py index 3bc89f9d..25da29c1 100644 --- a/uncompyle6/main.py +++ b/uncompyle6/main.py @@ -45,7 +45,7 @@ def _get_outstream(outfile): def decompile( co, - bytecode_version: str = PYTHON_VERSION_TRIPLE, + bytecode_version = PYTHON_VERSION_TRIPLE, out=sys.stdout, showasm=None, showast={}, @@ -171,7 +171,7 @@ def compile_file(source_path): def decompile_file( - filename: str, + filename, outstream=None, showasm=None, showast={}, diff --git a/uncompyle6/parsers/reducecheck/and_not_check.py b/uncompyle6/parsers/reducecheck/and_not_check.py index a246e630..dbdef029 100644 --- a/uncompyle6/parsers/reducecheck/and_not_check.py +++ b/uncompyle6/parsers/reducecheck/and_not_check.py @@ -3,7 +3,7 @@ def and_not_check( self, lhs, n, rule, ast, tokens, first, last -) -> bool: +): jmp = ast[1] if jmp.kind.startswith("jmp_"): if last == n: diff --git a/uncompyle6/semantics/fragments.py b/uncompyle6/semantics/fragments.py index dc4e8e47..00eee644 100644 --- a/uncompyle6/semantics/fragments.py +++ b/uncompyle6/semantics/fragments.py @@ -2276,7 +2276,7 @@ def deparsed_find(tup, deparsed, code): # def test(): # import os, sys -# def get_dups(li: list) -> set: +# def get_dups(li: list): # dups = {} # for item in li: # dups[item] = dups.get(item, -1) + 1 diff --git a/uncompyle6/semantics/pysource.py b/uncompyle6/semantics/pysource.py index bfcb357c..6cdfcee0 100644 --- a/uncompyle6/semantics/pysource.py +++ b/uncompyle6/semantics/pysource.py @@ -1414,7 +1414,7 @@ class SourceWalker(GenericASTTraversal, object): self.write("]") self.prune() - def get_comprehension_function(self, node, code_index: int): + def get_comprehension_function(self, node, code_index): """ Build the body of a comprehension function and then find the comprehension node buried in the tree which may