Skip to content

Aryan29/week1#4

Open
aryan29 wants to merge 27 commits intoietbitmesra:masterfrom
aryan29:aryan29/week1
Open

Aryan29/week1#4
aryan29 wants to merge 27 commits intoietbitmesra:masterfrom
aryan29:aryan29/week1

Conversation

@aryan29
Copy link

@aryan29 aryan29 commented Dec 17, 2019

No description provided.

@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

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.

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