Skip to content

Commit

Permalink
Add flake8 for project
Browse files Browse the repository at this point in the history
  • Loading branch information
prabhakar267 committed Oct 18, 2018
1 parent 881b624 commit f65360f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -4,4 +4,5 @@ python:
install:
- pip install -r requirements.txt
script:
- flake8
- python -m unittest
6 changes: 3 additions & 3 deletions main.py
Expand Up @@ -79,9 +79,9 @@ def main(input_path, output_path):
image_file_name = os.path.join(input_path, filename)
filename_without_extension = os.path.splitext(filename)[0]
text_file_path = os.path.join(output_path, filename_without_extension)
_ = subprocess.run(['tesseract', image_file_name, text_file_path],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
subprocess.run(['tesseract', image_file_name, text_file_path],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
logging.debug("Successfully parsed {}".format(filename))
successful_files += 1

Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
@@ -1,3 +1,7 @@
flake8==3.5.0
mccabe==0.6.1
mock==2.0.0
pbr==4.3.0
pycodestyle==2.3.1
pyflakes==1.6.0
six==1.11.0
5 changes: 5 additions & 0 deletions setup.cfg
@@ -0,0 +1,5 @@
[flake8]
max-line-length = 120
exclude =
venv,
.git,

0 comments on commit f65360f

Please sign in to comment.