diff --git a/case-1-lint/functions.py b/case-1-lint/functions.py index a4eb05f7a27f9b5737c95dcdb21dbd37e0cce08e..f44d681c9fad59bdb249d46e15cbd55f49ead2dd 100644 --- a/case-1-lint/functions.py +++ b/case-1-lint/functions.py @@ -1,15 +1,37 @@ -import math,os,time,json -def f(x):return x*2+3*math.pi**2 if x>5 else x*3+2.7182 -def g(a,b,c):return a+b*c-(b/a)+math.sin(a) -def h():return { 'key': [ 1, 2, 3,4], 'val': 'example' } +import math, os, time, json + + +def f(x): + return x * 2 + 3 * math.pi**2 if x > 5 else x * 3 + 2.7182 + + +def g(a, b, c): + return a + b * c - (b / a) + math.sin(a) + + +def h(): + return {"key": [1, 2, 3, 4], "val": "example"} + + class Horrible: - def __init__(self):self.val=0 - def m1(self,a):self.val+=a - def m2(self):return self.val - def m3(self):return self.val*10 - def m4(self,a):self.val-=a -a=Horrible() + def __init__(self): + self.val = 0 + + def m1(self, a): + self.val += a + + def m2(self): + return self.val + + def m3(self): + return self.val * 10 + + def m4(self, a): + self.val -= a + + +a = Horrible() a.m1(5) a.m2() a.m4(3) -print(f(a.m2())+g(2,3,4)-h()['key'][2]*a.m3()) +print(f(a.m2()) + g(2, 3, 4) - h()["key"][2] * a.m3()) diff --git a/ci-configs/case-1-lint/lint.yml b/ci-configs/case-1-lint/lint.yml index 71896319ddbf7e606d2633f593dd7be43a21ad61..c00acea882e9718a28ad13ffcffd844a0c96ad57 100644 --- a/ci-configs/case-1-lint/lint.yml +++ b/ci-configs/case-1-lint/lint.yml @@ -1,4 +1,4 @@ -lint: +❄️8⬛: stage: 🕵️ image: python:3.11 script: