Commit Graph

8 Commits

Author SHA1 Message Date
Martin Thoma
71e3396bd5 Python: Make code testable
Avoid executing code on module level as this prevents importing the
module for testing. Especially infinite loops are evil.
2022-03-19 09:54:52 +01:00
Martin Thoma
b65dca80f6 Clean Code: Apply flake8-simplify to Python
Also flake8-comprehensions which was added to the CI

For flake8-simplify, there are a few false-positives,
e.g. https://github.com/MartinThoma/flake8-simplify/issues/115
2022-03-18 22:29:56 +01:00
Martin Thoma
fed9b92672 Python: Fix Flake8 E722 and E741
Additionally:

* Use functions to group blocks of code
* Use variable names (not just one character...)
2022-03-12 08:17:03 +01:00
Martin Thoma
93e1a78363 MAINT: Apply pre-commit
Remove byte-order-marker pre-commit check as there would be
many adjustments necessary
2022-03-05 09:29:23 +01:00
eries2
643f77e08f added a beter pretty print for each tower. helped my 7yo visualize what was going on 2022-01-02 10:50:22 -08:00
ericries
18a2e34c61 Update tower.py
easier debugging with fewer disks
2022-01-01 17:26:04 -08:00
ericries
7f88e7dd68 Add files via upload
Simple python implementation. Apologies for any errors, I only had a minute to whip this up
2022-01-01 17:05:56 -08:00
Chris Reuter
5f664bc71d Removed spaces from top-level directory names.
Spaces tend to cause annoyances in a Unix-style shell environment.
This change fixes that.
2021-11-21 18:30:21 -05:00