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

Aryan29/week1 #4

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

Aryan29/week1 #4

wants to merge 27 commits into from

Conversation

aryan29
Copy link

@aryan29 aryan29 commented Dec 17, 2019

No description provided.

Week-1/aryan29/README.md Outdated Show resolved Hide resolved
@karngyan
Copy link
Member

There are too many bad whitespace pylint errors. I'd recommend using a linter.

@karngyan
Copy link
Member

Also, do add a .gitignore for pycache

Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
def generate_json(self,mob):
list=[]
try:
f=open("data.json","r")
Copy link
Member

Choose a reason for hiding this comment

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

Single character variable is highly discouraged.

Week-1/aryan29/api.py Outdated Show resolved Hide resolved
Week-1/aryan29/api.py Outdated Show resolved Hide resolved
cprint(f"{mob1} is better than {mob2} comparing all the features",'cyan')

if __name__ == "__main__":
if(len(sys.argv)>1):
Copy link
Member

Choose a reason for hiding this comment

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

Are you familiar with 'argparse'?

if(c%8==1):
checkserver() #1day updates
time.sleep(updation_time)
time.sleep(updation_time)
Copy link
Member

Choose a reason for hiding this comment

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

I'm not reviewing each line. But these are the general errors I saw after having a look:

  • Some lines seem too long to follow PEP8
  • Documentation is None.
  • Please defer from using multiple imports in a single line.
  • For constants, using UPPER_CASE should be the way to go.
  • Pick a style.
  • Some imports are unused.
  • Correct your import order.
  • Few variables are unused. e.g.: res
  • f is used in two scopes.

Copy link
Author

Choose a reason for hiding this comment

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

Now using PEP8
Import Rules Done
Line Too Long Done
Using mixedCase for Variables, snake_case for functions and UPPER_CASE for constants
Unused variables and functions removed

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.

2 participants