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

Python conventional changes + typo #154013

Merged
merged 8 commits into from
Sep 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions extensions/python/test/colorize-fixtures/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@ def some_func(a:
}=42):
pass

if 1900 < year < 2100 and 1 <= month <= 12 \
and 1 <= day <= 31 and 0 <= hour < 24 \
and 0 <= minute < 60 and 0 <= second < 60: # Looks like a valid date
return 1
pass

def firstn(g, n):
for i in range(n):
for _ in range(n):
yield g.next()

reduce(lambda x,y: x+y, [47,11,42,13])
Expand All @@ -37,15 +34,14 @@ def firstn(g, n):
}

def steuern(einkommen):
"""Berechnung der zu zahlenden Steuern fuer ein zu versteuerndes Einkommen von x"""
if einkommen <= 8004:
steuer = 0
elif einkommen <= 13469:
y = (einkommen -8004.0)/10000.0
steuer = (912.17 * y + 1400)*y
else:
steuer = einkommen * 0.44 - 15694
return steuer
"""Berechnung der zu zahlenden Steuern fuer ein zu versteuerndes Einkommen von x"""
if einkommen <= 8004:
return 0
elif einkommen <= 13469:
y = (einkommen -8004.0)/10000.0
return (912.17 * y + 1400)*y
else:
return einkommen * 0.44 - 15694

def beliebig(x, y, *mehr):
print "x=", x, ", x=", y
Expand Down