Procyonae
07b941ed35
Fix various flake8 errors
2025-01-13 12:37:12 +00:00
Alexey Kim
63997f985f
Remove utilities\building-utility
2023-03-24 17:02:48 +03:00
strategineer
1efa02fcfe
Add a high contrast color theme and basic utility script to test readability of color themes ( #64385 )
2023-03-23 18:29:26 -03:00
Kevin Granade
7346fab555
slightly less ambiguous nane
...
Addressing new flake warnings
2022-12-08 09:25:52 -08:00
Alexey Kim
873d989fd0
Remove unused variable (python)
2022-10-28 16:33:44 +03:00
UmbralReaper
dda9fe5de6
Silence flake8 linter errors
2021-07-09 20:25:07 +10:00
UmbralReaper
cb8241f9af
Set ensure_ascii=False wherever json.dump is called
...
It's not uncommon for json files to have unicode. This change ensures
that the unicode stays unicode and doesn't become an escape sequence.
2021-07-09 17:41:00 +10:00
UmbralReaper
0316316467
Explicitly declare encoding as utf-8 whenever a file is opened
...
Python uses the ANSI code page encoding by default on Windows. By explicitly
declaring the encoding as utf-8 we avoid errors relating to utf-8 down the road.
See https://docs.python.org/3/using/windows.html for more information.
2021-07-09 17:28:01 +10:00
haveric
c380afc798
Fix spelling issues ( #45878 )
...
* JSON description spelling fixes
* Markdown + txt spelling fixes
* Fix FLAMMABLE_ASH flag for butchering rack
* Fix result spelling of southwest
* Fix cephalopod achievement id spelling
* unsually is probably unusually
* Fix spelling in dynamic line
* Simple comment/text spelling fixes
* Fix variable/enum spellings
* Fix function spelling issues
2020-12-08 16:46:14 -08:00
Eric Pierce
1b618d3106
Reformat long lines in make_iso.py
...
Working towards a 79-character limit in our Python scripts
2020-09-26 21:12:07 -04:00
John Bytheway
8e19644513
Enable Flake8 E302 and E305
...
These enforce double spacing before and after function and class
definitions.
2020-09-24 13:15:36 -04:00
John Bytheway
f69d2cbac5
Enable Flake8 E722
...
This check looks for uses of bare 'except:'; these are bad because they
catch e.g. SystemExit, which should not normally be caught.
2020-09-24 12:46:45 -04:00
John Bytheway
dc88103fde
Enable Flake8 E262
...
This checks for spaces after the '#' that introduces a comment.
2020-09-23 21:55:53 -04:00
John Bytheway
3d881d878c
Enable Flake8 E261
...
This enforces two spaces before inline comments.
2020-09-22 20:34:59 -04:00
John Bytheway
29672608ae
Enable Flake8 E231
...
This one checks for spaces after commas.
2020-09-20 23:48:58 -04:00
Eric Pierce
888294580c
Clean up make_iso.py script for UltiCa conversion ( #42397 )
...
* Clean up directory handling, weighted sprites
* Last couple glitches; works on Brown like Bears
* Better print statements
* More cleanup, ignore some failures
Does a mostly-working conversion of UltiCa now
* Expand help text with examples, document -f
2020-08-31 12:04:02 +03:00
Serhiy Zahoriya
5cc59e134e
Python 3 everywhere, PEP8 ( #42559 )
...
* Ported Python scripts with 2to3, appeased PEP8
* Removed unused function, UTF-8 is default in Python 3
* Removing more Python 2 specific syntax
* Fixing docs
* Replacing python executable with python3
2020-08-03 10:21:11 +03:00
Andrey Bienkowski
5e97a26c62
Wrap all lone top level json objects in arrays
...
Convert
```
{
"type": "foo",
...
}
```
into
```
[
{
"type": "foo",
...
}
]
```
More uniform json structure makes using jq and writing tooling easier.
2020-06-28 15:38:47 +03:00
John Bytheway
f2881ee4a3
Python script shebang cleanup ( #37859 )
...
* Use explicit Python version in json tools
These tools used '#!/usr/bin/env python' but required Python 2. This no
longer works on systems where Python 3 is the default.
Tweak their #! lines to specify python2.
* Remove space from #! line
* Make gfx_tools find python by path
The scripts in tools/gfx_tools were running /bin/python directly. The
convention is to use /usr/bin/env python, so switch to that.
Also, they were not executable. Make them so.
* Make Python scripts executable
Some Python scripts had #! lines but were not executable. Make them so.
2020-02-09 22:01:50 +03:00
AMurkin
dbe0a793ab
chmod +x python tools
2019-05-26 17:38:39 -07:00
Leland Clemmons
fb956c2efe
Move make_iso.py to utilities folder
...
This file allows the creation of ISO graphics from 2D tilesets
2018-04-02 00:00:52 -04:00
wormingdead
284ca3e6dd
[Building Utility] Help epilog now uses raw formatting. Kind of a pain, but a lot easier to read.
2014-08-26 15:25:24 -07:00
wormingdead
1137970d95
[Building Utility] List acidia as creator again. Sorry about that.
2014-08-25 21:52:26 -07:00
wormingdead
d025176aaf
[Building Utility] Remembered to add output examples.
2014-08-25 02:04:56 -07:00
wormingdead
3e289e2091
[Building Utility] Fix output file creation error when working with full path names.
2014-08-25 01:37:05 -07:00
wormingdead
6e73972bff
[Building Utility] Rename json_list to json_output_list to be more explicit.
2014-08-25 01:25:29 -07:00
wormingdead
1399daca25
[Building Utility] Docstring for complete_json_file.
2014-08-25 01:25:26 -07:00
wormingdead
3d3a3b8398
[Building Utility] Marginally better output file names.
2014-08-25 01:25:23 -07:00
wormingdead
774857f3b4
[Building Utility] Refactor template_function_exec using is_list_of_lists.
2014-08-25 01:25:20 -07:00
wormingdead
fe5b9358a2
[Building Utility] Add docstring to template_function_exec.
2014-08-25 01:25:17 -07:00
wormingdead
3d72b0432a
[Building Utility] Rename function template_update to template_function_exec.
2014-08-25 01:25:15 -07:00
wormingdead
113d794cf0
[Building Utility] New function is_list_of_lists to help refactor template_update.
2014-08-25 01:25:12 -07:00
wormingdead
c17041be50
[Building Utility] Better indentation in recursive_dict_update.
2014-08-25 01:25:08 -07:00
wormingdead
b79e391029
[Building Utility] Get some function docstrings done.
2014-08-25 01:25:05 -07:00
wormingdead
52982a50bf
[Building Utility] Move parser creation to function cli_interface. Move main function calls to function main.
2014-08-25 01:25:01 -07:00
wormingdead
3d1e8f24a4
[Building Utility] Better indentation for multi-line function parameters.
2014-08-25 01:24:58 -07:00
wormingdead
3f43e7c827
[Building Utility] Lowercase template types to match style of project json.
2014-08-25 01:24:53 -07:00
wormingdead
683dd5d027
[Building Utility] Convert docstrings to multiline strings following PEP-257.
2014-08-25 01:24:48 -07:00
wormingdead
4504f1a5c5
[Building Utility] Move examples to Examples/ dir. Remove old output examples.
2014-08-25 01:24:42 -07:00
wormingdead
e4767dcc04
[Building Utility] Some delinting. Remove unused import. Handle possible undefined variable use. Whitespace.
2014-08-02 13:51:16 -07:00
wormingdead
e9430f9f4a
[Building Utility] Replace example part 2 (terrain template).
2014-08-02 13:34:58 -07:00
wormingdead
35f7377315
[Building Utility] Replace example with new template format for office tower.
2014-08-02 13:34:58 -07:00
wormingdead
988a7e049d
[Building Utility] Remove old functionality. Add parser (with help section) and use new functionality.
2014-08-02 13:34:58 -07:00
wormingdead
648457b933
[Building Utility] Added complete_json_file function. Needs doc string still.
2014-08-02 13:34:58 -07:00
wormingdead
642b4eded6
[Building Utility] Added template_update function. Needs doc string still.
2014-08-02 13:34:58 -07:00
wormingdead
45a33b41a4
[Building Utility] Added get_map_cells function. Needs doc string still.
2014-08-02 13:34:58 -07:00
wormingdead
716157db54
[Building Utility] Added recursive_dict_update function.
2014-08-02 13:34:57 -07:00
wormingdead
b9cfc6b45d
[Building Utility] Added internal_append function.
2014-08-02 13:34:57 -07:00
wormingdead
51a0c11af9
[Building Utility] Remove old comments and add more modules. Need to figure out credits and license info?
2014-08-02 13:34:57 -07:00
wormingdead
fdb7c63d9d
[Building Utility] Added division_split function.
2014-08-02 13:34:57 -07:00