Start using isort

This commit is contained in:
Aminda Suomalainen 2024-07-12 10:14:44 +03:00
parent 95b7e82f86
commit 4121f9ea30
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
4 changed files with 11 additions and 5 deletions

View File

@ -69,6 +69,12 @@ repos:
hooks: hooks:
- id: add-trailing-comma - id: add-trailing-comma
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 24.4.2 rev: 24.4.2
hooks: hooks:

View File

@ -28,5 +28,6 @@ disable = ["W0511"]
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html # https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html
# isort
[tool.isort] [tool.isort]
profile = "black" profile = "black"

View File

@ -2,12 +2,12 @@
Sovellus tekee listasta pareja Sovellus tekee listasta pareja
""" """
# Tuodaan paketti tabulate.
import tabulate
# Tarvitaan parien muodostamiseen # Tarvitaan parien muodostamiseen
import random import random
# Tuodaan paketti tabulate.
import tabulate
# Määritetään pääfunktio # Määritetään pääfunktio
def main(): def main():

View File

@ -1,8 +1,7 @@
# Tuodaan turtle -kirjasto # Tuodaan turtle -kirjasto
import turtle
# Satunnaislukuja # Satunnaislukuja
import random import random
import turtle
# ikkkuna = turtle.Screen() # ikkkuna = turtle.Screen()