Skip to content

Commit a497745

Browse files
authored
Merge pull request #3 from hrosicka/chore/add-linting-workflow
ci: add github actions for python linting
2 parents 1f445c4 + 7b215d4 commit a497745

9 files changed

Lines changed: 57 additions & 15 deletions

File tree

.github/workflows/linting.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Linting
2+
3+
on:
4+
push:
5+
branches: [ "main", "master" ]
6+
pull_request:
7+
branches: [ "main", "master" ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.13"
20+
21+
- name: Install Ruff
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install ruff
25+
26+
- name: Run Ruff Lint
27+
run: ruff check .
28+
29+
- name: Run Ruff Format Check
30+
run: ruff format --check .

barevnyornament.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from turtle import exitonclick, bgcolor, title, colormode
44
import turtle
5-
from random import randint
65

76

87
def cara(t, strana, barva):

crazyvilllage.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
from turtle import exitonclick, bgcolor, title, colormode
44
import turtle
5-
from random import randint
65

7-
# ze souboru vesnice je potřeba funkce domecek
8-
from vesnice import *
6+
from vesnice import domecek
97
import tkinter
108

119

@@ -48,7 +46,6 @@ def main():
4846
velikostDomecku = 3
4947

5048
for _ in range(20):
51-
5249
barva = (red, green, 0)
5350
posun(t, dilek)
5451
dilek = dilek + 20

dlazdice.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# nakreslí vesnici pomocí knihovny turtle
22

3-
from turtle import exitonclick, bgcolor, screensize, title, colormode
3+
from turtle import exitonclick, bgcolor, title, colormode
44
import turtle
5-
from random import randint, randrange
6-
import math
5+
from random import randint
76

87

98
def dlazdice(t, strana, barva):

doc/LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) [2024] [hrosicka]
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

fialovyornament.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# nakreslí vesnici pomocí knihovny turtle
22

3-
from turtle import exitonclick, bgcolor, screensize, title, colormode
3+
from turtle import exitonclick, bgcolor, title, colormode
44
import turtle
55
from random import randint
66

modrozelenyornament.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# nakreslí vesnici pomocí knihovny turtle
22

3-
from turtle import exitonclick, bgcolor, screensize, title, colormode
3+
from turtle import exitonclick, bgcolor, title, colormode
44
import turtle
55
from random import randint
6-
import math
76

87

98
def cara(t, strana, barva):

sinewaves.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# nakreslí vesnici pomocí knihovny turtle
22

3-
from turtle import exitonclick, bgcolor, title, colormode
3+
from turtle import exitonclick, bgcolor, title
44
import turtle
5-
from random import randint
65
import math
7-
import turtle
86

97
bgcolor("lightblue")
108
title("Sine Waves")

vesnice.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def main():
7474

7575
# vesnice má 100 domečků
7676
for _ in range(100):
77-
7877
# náhodně určená poloha domku z intervalu
7978
x = randint(-300, 300)
8079
y = randint(-300, 300)

0 commit comments

Comments
 (0)