All main wml tools: used Python 3 floating point division
wmltools required integer division, so here the corresponding operator (//) is used
This commit is contained in:
parent
be62976d80
commit
4d675c377f
5 changed files with 6 additions and 6 deletions
|
@ -20,7 +20,7 @@ Limitations:
|
|||
enough for now.
|
||||
"""
|
||||
|
||||
from __future__ import print_function, unicode_literals
|
||||
from __future__ import print_function, unicode_literals, division
|
||||
from future_builtins import filter, map, zip
|
||||
|
||||
from functools import total_ordering
|
||||
|
|
|
@ -3,7 +3,7 @@ wmltools.py -- Python routines for working with a Battle For Wesnoth WML tree
|
|||
|
||||
"""
|
||||
|
||||
from __future__ import print_function, unicode_literals
|
||||
from __future__ import print_function, unicode_literals, division
|
||||
from future_builtins import filter, map, zip
|
||||
|
||||
from functools import total_ordering
|
||||
|
@ -138,7 +138,7 @@ class Forest:
|
|||
elif os.path.isfile(os.path.join(root, subdir, 'info.cfg')):
|
||||
if os.path.isfile(os.path.join(root, subdir, 'COPYING.txt')):
|
||||
count += 1
|
||||
if count >= (stop / 2):
|
||||
if count >= (stop // 2):
|
||||
roots.append(os.path.basename(root))
|
||||
for subdir in dirlist:
|
||||
if subdir + '.cfg' in files:
|
||||
|
|
|
@ -61,7 +61,7 @@ if there's an indent open at end of file or if a closer occurs with
|
|||
indent already zero; these two conditions strongly suggest unbalanced WML.
|
||||
"""
|
||||
|
||||
from __future__ import print_function, unicode_literals
|
||||
from __future__ import print_function, unicode_literals, division
|
||||
from future_builtins import filter, map, zip
|
||||
|
||||
import sys, os, getopt, filecmp, re, codecs
|
||||
|
|
|
@ -181,7 +181,7 @@
|
|||
# code.
|
||||
#
|
||||
|
||||
from __future__ import print_function, unicode_literals
|
||||
from __future__ import print_function, unicode_literals, division
|
||||
from future_builtins import filter, map, zip
|
||||
|
||||
import sys, os, re, getopt, string, copy, difflib, time, gzip, codecs
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
#
|
||||
# sets the warning level.
|
||||
|
||||
from __future__ import print_function, unicode_literals
|
||||
from __future__ import print_function, unicode_literals, division
|
||||
from future_builtins import filter, map, zip
|
||||
|
||||
import sys, os, time, re, getopt, hashlib, glob, codecs
|
||||
|
|
Loading…
Add table
Reference in a new issue