We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bc2a80 commit 97506b4Copy full SHA for 97506b4
pk_helper.py
@@ -1,9 +1,5 @@
1
-
2
3
4
def limit_instances(count,cmin,cmax):
5
- cmin = 1 if not cmin else int(cmin)
6
- cmax = cmin if not cmax else max(int(cmax),cmin)
7
- count = max(min(int(count),cmax),cmin) if count else cmin
8
- return count,cmin,cmax
9
+ cmin = 1 if cmin is None else int(cmin)
+ cmax = cmin if cmax is None else max(int(cmax),cmin)
+ count = cmin if count is None else max(min(int(count),cmax),cmin)
+ return count,cmin,cmax
0 commit comments