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

Refactor #25

Merged
merged 1 commit into from May 16, 2022
Merged

Refactor #25

merged 1 commit into from May 16, 2022

Conversation

fristhon
Copy link
Contributor

@fristhon fristhon commented May 16, 2022

Hey I came from reddit and these are my suggestions for you

  • use F-strings instead of concatenation
  • use one-line if/else statements as you can !
  • return immediately in functions instead of declaring extra variable
  • use comprehensions
  • merge nested if statements
  • use CONSTANT variables (for example you can have something like : WHITE_COLOR = [255,255,255] instead of repeating the color code many times)
  • use with keyword for opening/closing files

we should apply these rules as far as the code readability stay safe, good luck

@dille12
Copy link
Owner

dille12 commented May 16, 2022

All of this is pretty new to me, thank you for introducing me to these!

@dille12 dille12 merged commit 7b4997e into dille12:main May 16, 2022
dille12 added a commit that referenced this pull request Nov 3, 2023
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.

None yet

2 participants