-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from amperser/python3
Python3. 💥
- Loading branch information
Showing
12 changed files
with
80 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- ./proselint/command_line.py (original) | ||
+++ ./proselint/command_line.py (refactored) | ||
@@ -59,7 +59,7 @@ | ||
# Extract the checks. | ||
sys.path.append(proselint_path) | ||
checks = [] | ||
- check_names = [key for (key, val) in options["checks"].items() if val] | ||
+ check_names = [key for (key, val) in list(options["checks"].items()) if val] | ||
for check_name in check_names: | ||
module = importlib.import_module("checks." + check_name) | ||
for d in dir(module): | ||
@@ -140,7 +140,7 @@ | ||
input_val = None | ||
while not isinstance(input_val, int): | ||
try: | ||
- input_val = input("# of false alarms? ") | ||
+ input_val = eval(input("# of false alarms? ")) | ||
if input_val == "exit": | ||
return | ||
else: | ||
--- ./proselint/tools.py (original) | ||
+++ ./proselint/tools.py (refactored) | ||
@@ -44,7 +44,7 @@ | ||
|
||
tempargdict = inspect.getcallargs(f, *args, **kwargs) | ||
|
||
- for item in tempargdict.items(): | ||
+ for item in list(tempargdict.items()): | ||
signature += item[1].encode('utf-8') | ||
|
||
key = hashlib.sha256(signature).hexdigest() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters