Skip to content

minor code cleanup (first attempt)#20

Open
sudhishkr wants to merge 2 commits into
stitchfix:masterfrom
sudhishkr:sudhishkr/cleanupImports
Open

minor code cleanup (first attempt)#20
sudhishkr wants to merge 2 commits into
stitchfix:masterfrom
sudhishkr:sudhishkr/cleanupImports

Conversation

@sudhishkr

@sudhishkr sudhishkr commented Mar 4, 2018

Copy link
Copy Markdown

@TheDataChef @jeffmagnusson @drudd (pulled this list from frequent & recent committers to this repo)

first attempt at a minor code cleanup PR, have left comments on why I have removed / edited directly on the diffs to make it easier for you to read.

Comment thread splits/writers.py
@@ -1,5 +1,3 @@
import os

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleaning up unused imports in the file

Comment thread test/test_readers.py
self.assertEquals(self.reader.read(1), '')

def test_read_n_chars(self):
def test_read_n_chars_2(self):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there were 2 tests with the same name, separating them as test_*_1 & test_*_2

Comment thread test/test_readers.py
self.assertEquals(x, str(index))

def test_read_n_chars(self):
def test_read_n_chars_1(self):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there were 2 tests with the same name, separating them as test_*_1 & test_*_2

Comment thread splits/s3.py
import boto.s3
import boto.s3.connection
import boto.provider
import zipfile

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleaning up unused imports in the file

Comment thread splits/readers.py

return line

def readlines(self, sizehint=None):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleaning up because : sizehint is unused

Comment thread splits/readers.py
line += new_data

if limit > 0 and len(line) == limit:
if 0 < limit == len(line):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shortening the chained comparison problem

Comment thread .gitignore

# IDE
.idea
.idea/*

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i use pycharm for python work, just thought its good to have these in the .gitignore to avoid idea folder from getting checked in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant