Commit Graph
215 Commits
Author SHA1 Message Date
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
Athanasius 2e58d106bd logging.getLogger(appname) instead of import from EDMarketConnector
Using:

from EDMarketConnector import logger

causes issues if EDMarketConnector is already importing 'this' file.

So just get a logger using logger.getLogger(appname) instead.
`from config import appname` if needs be.
2020-07-27 06:57:52 +01:00
Athanasius 8e1f3b8a90 plugins/inara: Fix typo on except: 2020-07-27 06:57:52 +01:00
Athanasius 7d060aa325 plugins/inara: Convert to proper logging 2020-07-27 06:57:52 +01:00
Athanasius 7951463fba plugins/edsm: Converted to proper logging 2020-07-27 06:57:52 +01:00
Athanasius 6aa409388e plugins/eddn: Converted to proper logging 2020-07-27 06:57:52 +01:00
A_D 5aaf88b281 fix quoting style 2020-07-26 23:08:47 +01:00
A_D 87b7f639bb cleanup coriolis.py 2020-07-26 23:08:47 +01:00
Athanasius b6f6365566 plugins/edsm: Fix missing line of code
Bad paste or something, who knows ?
2020-07-21 18:25:03 +01:00
Athanasius 29e3cba67e plugins/edsm: Align with code tested in inara plugin
* Use same state logic as Inara plugin now has.
* this.system_link for the Tk item, this.system is the system name.
* Ensure station text+link set on prefs change.
# Add a set of future TODO items.
2020-07-21 17:29:03 +01:00