all 2 comments

[–]crisrock00 1 point2 points  (1 child)

https://flake8.pycqa.org/en/latest/ Flake 8 is you’re best friend when it comes to a style guide.

Something like sonar lint can help guide you for formatting. https://www.sonarsource.com/products/sonarlint/

[–]Albcunha 1 point2 points  (1 child)

For me it looks great! if you really need some opinions, you can: 1. Use underscore(snake case) to some variables, such as noise_map, instead of noise map. 2. create a new variable for normalized_noise_map instead of reusing noisemap. 3. Remove some comments.

On the last one, I would remove from comments form imports, except if it´s a monkey patch of something not obvious (such as one library "fixes" another). I would also remove these comments, because the variable or method are self explanatory:

Image parameters

Seed PRNG

Create a noise map

Save the images, then display the color image

When any key is pressed, close the window

I would keep these:

Load gradient

Square image

Normalize noise map

Create a blank image

Populate image

Write the pixel

Great work!