Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor code cleanup (first attempt) #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

minor code cleanup (first attempt) #20

wants to merge 2 commits into from

Conversation

sudhishkr
Copy link

@sudhishkr sudhishkr commented Mar 4, 2018

@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.

@@ -1,5 +1,3 @@
import os

Copy link
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

@@ -40,7 +40,7 @@ def test_read_n_chars(self):

self.assertEquals(self.reader.read(1), '')

def test_read_n_chars(self):
def test_read_n_chars_2(self):
Copy link
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

@@ -30,7 +30,7 @@ def test_read(self):
for index, x in enumerate(lines.split('\n')):
self.assertEquals(x, str(index))

def test_read_n_chars(self):
def test_read_n_chars_1(self):
Copy link
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

@@ -3,7 +3,6 @@
import boto.s3
import boto.s3.connection
import boto.provider
import zipfile
Copy link
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

@@ -96,7 +93,7 @@ def readline(self, limit=None):

return line

def readlines(self, sizehint=None):
Copy link
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

@@ -87,7 +84,7 @@ def readline(self, limit=None):
else:
line += new_data

if limit > 0 and len(line) == limit:
if 0 < limit == len(line):
Copy link
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


# IDE
.idea
.idea/*
Copy link
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