Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Adopted from *Black*'s config

[flake8]
ignore = E203, E266, E501, W503
max-line-length = 88
select = B,C,E,F,W,T4,B9
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ matrix:
env: LINT=1
script:
- export PATH="$HOME/miniconda/bin:$PATH"
- yapf -dr modin/pandas
- flake8 --max-line-length=88 .
- black --check modin/
- flake8 .

install:
- ./.travis/install-dependencies.sh
Expand Down
3 changes: 2 additions & 1 deletion .travis/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ elif [[ "$LINT" == "1" ]]; then
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda install -y python==3.6.5
pip install black flake8 flake8-comprehensions

else
echo "Unrecognized environment."
exit 1
fi

pip install -r requirements.txt
pip install -q pytest flake8 flake8-comprehensions yapf feather-format lxml openpyxl xlrd numpy
pip install -q pytest feather-format lxml openpyxl xlrd numpy

2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Modin
.. image:: https://readthedocs.org/projects/modin/badge/?version=latest
:target: https://modin.readthedocs.io/en/latest/?badge=latest

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black
|

*Modin is a library for unifying the way you interact with your data*
Expand Down
13 changes: 6 additions & 7 deletions modin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ def git_version():
def _execute_cmd_in_temp_env(cmd):
# construct environment
env = {}
for k in ['SYSTEMROOT', 'PATH', 'HOME']:
for k in ["SYSTEMROOT", "PATH", "HOME"]:
v = os.environ.get(k)
if v is not None:
env[k] = v
# LANGUAGE is used on win32
env['LANGUAGE'] = 'C'
env['LANG'] = 'C'
env['LC_ALL'] = 'C'
return subprocess.Popen(
cmd, stdout=subprocess.PIPE, env=env).communicate()[0]
env["LANGUAGE"] = "C"
env["LANG"] = "C"
env["LC_ALL"] = "C"
return subprocess.Popen(cmd, stdout=subprocess.PIPE, env=env).communicate()[0]

try:
git_revision = _execute_cmd_in_temp_env(['git', 'rev-parse', 'HEAD'])
git_revision = _execute_cmd_in_temp_env(["git", "rev-parse", "HEAD"])
return git_revision.strip().decode()
except OSError:
return "Unknown"
Expand Down
Loading