Skip to content

Commit

Permalink
prettify: drop Python 2 imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-zero committed Feb 24, 2020
1 parent febe55d commit ae3c58d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
14 changes: 3 additions & 11 deletions tools/prettify/prettify.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,13 @@
import re
import tempfile
import os
from os import path
import logging
import argparse
import errno
import contextlib

try:
from hashlib import md5
except ImportError:
from md5 import new as md5

try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
from os import path
from hashlib import md5
from io import StringIO

from prettify_cp2k import normalizeFortranFile
from prettify_cp2k import replacer
Expand Down
8 changes: 2 additions & 6 deletions tools/prettify/prettify_cp2k/normalizeFortranFile.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import sys
import re
from collections import deque
import logging

try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from collections import deque
from io import StringIO

# Declare various RE snippets for building larger REs

Expand Down

0 comments on commit ae3c58d

Please sign in to comment.