Commit Graph
224 Commits
Author SHA1 Message Date
A_D 237e5ce52d Replaced subscript and concat with replace() call 2020-08-07 14:43:53 +02:00
A_D b5d3b89a3c Added docstrings and further type annotations 2020-08-07 14:39:12 +02:00
A_D a21280ed3b reordered imports 2020-08-07 13:32:01 +02:00
A_D 5aa6795773 Type annotate all the things! 2020-08-07 13:20:24 +02:00
A_D 94c4a7b7d0 Replaced static lists with tuples 2020-08-07 13:20:24 +02:00
A_D cea8ac49ca Ensured that regexps are raw strings
Ensures that there are no weird excaping issues
2020-08-07 13:20:23 +02:00
A_D e477f89664 removed un-needed object subclass 2020-08-07 13:20:23 +02:00
A_D 3c66ab7246 removed unused imports 2020-08-07 13:20:22 +02:00
A_D 6772c84a5f fixed names where possible 2020-08-07 13:20:22 +02:00
A_D c0026cea61 replaced list comps with generators 2020-08-07 13:20:21 +02:00
A_D c012ebc54e Replaced modulo-formatting with fstrings
Specifically did not replace `somefile.write('%s\n' % some_data)` as
print may change the line endings on some OSes which may not be wanted
2020-08-07 13:20:21 +02:00
A_D 4105662fb5 Cleaned up logic and removed overlong lines
Generally for the logic cleanups it was replacing giant list
comprehensions with slightly smaller filter calls. filter() is just
plain cleaner when all you're doing in a list comp is
[x for x in y if somecondition].
2020-08-07 13:20:21 +02:00
A_D 4d0cf4e335 Added scope change newlines 2020-08-07 13:20:20 +02:00
A_D b186e97747 autoformatted code 2020-08-07 13:20:19 +02:00
A_D 81dfbdfb8e Added timeout_session, made inara use it
timeout_session provides two things, TimeoutAdapter, a HTTP adapter
subclass that automatically adds timeouts to all requests, and
new_session, which automatically creates a request.Session with the
adapter in the correct place.
2020-07-31 15:53:20 +02:00
A_D 21a285e6e9 added some more type hints 2020-07-31 15:47:28 +02:00
A_D f8d4731472 fixed incorrect indexing 2020-07-31 15:47:27 +02:00
A_D eba318430a Removed todos about unused args 2020-07-31 15:47:27 +02:00
A_D 446c812485 replaced oneline logic with multiline 2020-07-31 15:47:26 +02:00
A_D 67a260c07f added type hints to literals 2020-07-31 15:47:26 +02:00
A_D 9005798862 fixed incorrect comment 2020-07-31 15:47:25 +02:00
A_D bb1def48cd replaced list comp with filter 2020-07-31 15:47:25 +02:00
A_D a699ab062d fixed station link logic 2020-07-31 15:47:24 +02:00
A_D e74c5c8ceb replaced list comp with filter 2020-07-31 15:47:23 +02:00
A_D 820b29f7dd replace dict(list-comp) with dict comp 2020-07-31 15:47:23 +02:00
A_D 539580e38d Consistently formatted multi-line add_event calls 2020-07-31 15:47:22 +02:00
A_D 96279cb0af Replaced repeated entry['event'] with variable 2020-07-31 15:47:21 +02:00
A_D 71ad0f92ac removed outdated comment 2020-07-31 15:47:21 +02:00
A_D 8e49066ca4 Replaced convoluted or-based logic with terneries 2020-07-31 15:47:20 +02:00
A_D 9db9ed4dfc Cleaned up overlong lines 2020-07-31 15:47:19 +02:00
A_D 13c2679c38 Added spacing around scope changes 2020-07-31 15:47:19 +02:00
A_D 160013e3e5 Added type annotations and docstrings 2020-07-31 15:47:18 +02:00
A_D eec4c2ebd6 autoformat with autopep8 2020-07-31 15:47:18 +02:00
A_D ce4149efd5 Added debug logs 2020-07-29 14:58:17 +01:00
Athanasius 525ebae61d Merge pull request #625 from A-UNDERSCORE-D/fix/624-inara-too-fast
Switched to using a timer for inara updates
2020-07-28 11:26:51 +01:00
A_D b27e4a3628 fixed tk import and type annotations 2020-07-27 15:15:56 +02:00
A_D cad5f72b0a updated type annotation 2020-07-27 15:15:55 +02:00
A_D 7b231fb244 removed unicode specifier from string
python3 strings are always unicode
2020-07-27 15:15:55 +02:00
A_D 07c43d3057 added type annotations to globals 2020-07-27 15:15:54 +02:00
A_D e0462d8719 Replaced complex oneliner with multiline if 2020-07-27 15:15:54 +02:00
A_D 37181264c9 Added newline after scope changes 2020-07-27 15:15:53 +02:00
A_D 4eed4404c6 Added Any type hint to this
Resolves most type warnings
2020-07-27 15:15:53 +02:00
A_D ab58aa6355 autoformatted file 2020-07-27 15:15:52 +02:00
A_D d4299c224f dont force a send on exit
just try and send if we can
2020-07-27 15:12:32 +02:00
A_D bb817eee3b removed outdated comment 2020-07-27 15:08:47 +02:00
A_D 340f8928b3 switched to using config for last update time 2020-07-27 15:08:47 +02:00
A_D 34760683e5 added some debug logging 2020-07-27 15:08:46 +02:00
A_D 72498b3bbc Switched to using a timer for inara updates
This adds a new thread that will run in a loop sending inara events once
ever 30 seconds. The old method of sending once for "special" events has
been removed.
2020-07-27 15:08:46 +02:00
Athanasius d7c2372417 Flake8 cleanup round #2 2020-07-27 10:14:16 +01:00
Athanasius f9a23cc831 Clean up flake8 output for this branch 2020-07-27 09:37:10 +01:00