Skip to content

Commit

Permalink
bump version, minor comments
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Oct 31, 2016
1 parent 09df87d commit a65e347
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion examples/pandas_progress_apply.py
Expand Up @@ -15,7 +15,7 @@
# df.groupby(0).progress_apply(lambda x: x**2)


""" Source code for `tqdm_pandas` (really simple!) """
# -- Source code for `tqdm_pandas` (really simple!)
# def tqdm_pandas(t):
# from pandas.core.frame import DataFrame
# def inner(df, func, *args, **kwargs):
Expand Down
14 changes: 7 additions & 7 deletions setup.py
Expand Up @@ -8,7 +8,7 @@
from distutils.core import setup
import sys
from subprocess import check_call
from io import open
from io import open as io_open

# For Makefile parsing
import shlex
Expand All @@ -21,7 +21,7 @@
import re


""" Makefile auxiliary functions """
# Makefile auxiliary functions #

RE_MAKE_CMD = re.compile('^\t(@\+?)(make)?', flags=re.M)

Expand All @@ -37,7 +37,7 @@ def parse_makefile_aliases(filepath):
# -- Parsing the Makefile using ConfigParser
# Adding a fake section to make the Makefile a valid Ini file
ini_str = '[root]\n'
with open(filepath, mode='r') as fd:
with io_open(filepath, mode='r') as fd:
ini_str = ini_str + RE_MAKE_CMD.sub('\t', fd.read())
ini_fp = StringIO.StringIO(ini_str)
# Parse using ConfigParser
Expand Down Expand Up @@ -116,12 +116,12 @@ def execute_makefile_commands(commands, alias, verbose=False):
check_call(parsed_cmd)


""" Main setup.py config """
# Main setup.py config #

# Get version from tqdm/_version.py
__version__ = None
version_file = os.path.join(os.path.dirname(__file__), 'tqdm', '_version.py')
with open(version_file, mode='r') as fd:
with io_open(version_file, mode='r') as fd:
exec(fd.read())

# Executing makefile commands if specified
Expand Down Expand Up @@ -154,10 +154,10 @@ def execute_makefile_commands(commands, alias, verbose=False):
sys.exit(0)


""" Python package config """
# Python package config #

README_rst = ''
with open('README.rst', mode='r', encoding='utf-8') as fd:
with io_open('README.rst', mode='r', encoding='utf-8') as fd:
README_rst = fd.read()

setup(
Expand Down
1 change: 0 additions & 1 deletion tqdm/_utils.py
Expand Up @@ -95,7 +95,6 @@ def _environ_cols_windows(fp): # pragma: no cover
def _environ_cols_tput(*args): # pragma: no cover
""" cygwin xterm (windows) """
try:
import subprocess
import shlex
cols = int(subprocess.check_call(shlex.split('tput cols')))
# rows = int(subprocess.check_call(shlex.split('tput lines')))
Expand Down
2 changes: 1 addition & 1 deletion tqdm/_version.py
Expand Up @@ -8,7 +8,7 @@
__all__ = ["__version__"]

# major, minor, patch, -extra
version_info = 4, 8, 4
version_info = 4, 9, 0

# Nice string for the version
__version__ = '.'.join(map(str, version_info))
Expand Down
4 changes: 2 additions & 2 deletions tqdm/tests/tests_tqdm.py
Expand Up @@ -50,7 +50,7 @@ def closing(arg):
if os.name == 'nt':
try:
import colorama # NOQA
except:
except ImportError:
nt_and_no_colorama = True

# Regex definitions
Expand Down Expand Up @@ -961,7 +961,7 @@ def test_position():
maxinterval=0, desc='pos1 bar', position=1)
t3 = tqdm(total=2, file=our_file, miniters=1, mininterval=0,
maxinterval=0, desc='pos2 bar', position=2)
for i in _range(2):
for _ in _range(2):
t1.update()
t3.update()
t2.update()
Expand Down

0 comments on commit a65e347

Please sign in to comment.