Commit Graph
6677 Commits
Author SHA1 Message Date
A_D 9231fe96fc removed unused configs 2020-09-16 22:26:32 +02:00
A_D 175d171924 replaced wine check, final cleanups 2020-09-16 22:15:40 +02:00
Athanasius 42c826f04b Merge pull request #704 from EDCD/cleanup/commodity.py
Cleanup/commodity.py
2020-09-16 21:01:27 +01:00
A_D 74372b997d removed invalid magic import 2020-09-16 20:30:28 +02:00
A_D 0fec834fb9 fixed always on top location 2020-09-16 20:27:03 +02:00
A_D 315258d3e7 Added row tracking variables to config tabs
This adds a new class called AutoInc, which is a self-incrementing
integer that supports use as a context manager. AutoInc is used to keep
track of row numbers automatically for easy addition to config panes,
and the context manager adds a visual clue to where entries are on the
same row but different columns
2020-09-16 19:43:02 +02:00
Athanasius beeadf266a Merge pull request #703 from EDCD/feature/tk-dir-dialog
Locale: More detailed login at startup around changes
2020-09-16 09:43:39 +01:00
Athanasius c9bea98021 Refer to Known Issues in Bug Report Template. 2020-09-16 09:42:05 +01:00
Athanasius 14d1a0ad5e companion.py: Re-format next(...) to be more obvious. 2020-09-15 17:30:23 +01:00
Athanasius ed52528718 companion.py: Slight tweaks from running mypy
NB: Using `mypy --follow-imports skip` for now to limit how much it
checks each time.
2020-09-15 16:15:13 +01:00
Athanasius c311957eff companion.py: import requests does belong down there. 2020-09-15 15:49:28 +01:00
Athanasius 55fcfbeb17 companion.py: Further PyCharm-prompted cleanup.
* Correct use of error[0] to just error.
* We don't want methods not referencing self to be static in this case,
  so annotate them.
* Take suggestion of "if v == []:" equivalent to "if not v:".
* Preserve CAPIData typing throughout filter_ship().
2020-09-15 15:33:00 +01:00
Athanasius 4575353923 companion.py: CAPIData type & PyCharm-prompted cleanup.
* CAPI Data really is just a Dict.  Define a custom type so it could
  easily be a class in future with minimal edits.
* Auth.refresh() *can* also return a str (Access Token).
* Catch specific (but still quite loose) exceptions in Auth.refresh().
* Set self.server in Session.__init__.
* Remove some extraneous () on conditionals.
2020-09-15 15:00:22 +01:00
Athanasius da2a582c46 companion.py: Use custom type for CAPI Data.
This way if we get more stringent about it (could be a class) we don't
need to edit all the references.
2020-09-15 14:35:37 +01:00
Athanasius c12c739c11 companion.py: Full pass to 100% pass flake8
* docstrings added throughout.
* .format() all now f-strings.
* Type annotations added throughout.
* White space tweaked.
2020-09-15 14:15:07 +01:00
Athanasius 8b5e5e73de Locale: More detailed login at startup around changes
As we might run into some special cases with users we need to log in
more detail what the locale is around our changes.

NB: Also contains some misc. PyCharm-enacted formatting changes, white
space, wrapping etc.
2020-09-15 10:28:28 +01:00
A_D 871838106f Broke __init__ into multiple methods
Each tab now has its own method, rather than them all being in one giant
unmaintainable blob in the middle of the init method
2020-09-14 17:23:54 +02:00
A_D fc431e457d refactored logic 2020-09-14 17:21:41 +02:00
A_D f9f6907a2c renamed variables to reduce ambiguity 2020-09-14 17:21:20 +02:00
A_D df554ec8b3 Added docstrings 2020-09-14 17:21:09 +02:00
A_D 2459de4893 Added spacing around scope changes 2020-09-14 17:20:38 +02:00
A_D ef359395ec Removed object subclass 2020-09-14 17:19:58 +02:00
A_D b85b0622f5 Fixed some type issues 2020-09-14 17:19:57 +02:00
A_D 3010f21965 Added some type comments to appease pylance 2020-09-14 17:19:57 +02:00
A_D 742709c431 Replaced modulo-formatting with fstrings 2020-09-14 17:19:56 +02:00
A_D d77cfd0e7a removed bare excepts 2020-09-14 17:19:56 +02:00
A_D 9f8d8a9052 cleaned up overlong lines 2020-09-14 17:19:55 +02:00
A_D ebc34d858c autoformatted and sorted imports 2020-09-14 17:19:55 +02:00
Athanasius faf4906eea Merge pull request #701 from EDCD/fix/671-no-modules
Fix the detection of no modules being available at a station, so is_horizons() doesn't blindly modules.values().
2020-09-14 16:16:39 +01:00
Athanasius c7f8b3dada Translations: Fix erroneous newline in a RU string 2020-09-14 15:44:03 +01:00
Athanasius 62851bfe3b Merge pull request #702 from EDCD/feature/tk-dir-dialog
Use tkinter.filedialog on win32, because we now fix locale encoding
2020-09-14 15:43:49 +01:00
Athanasius 31203270bc Switch to "thing is None" on tests. 2020-09-14 15:43:15 +01:00
Athanasius 52dcd3b28a Use tkinter.filedialog on win32, because we now fix locale encoding
tkinter ends up calling something where utf8 characters won't work
because of the windows encoding, e.g. cp1252.

We can't set encoding just for the dialogs, as it's not thread safe.  So
we'll just set it at startup instead.  Utilising:

	locale.setlocale(locale.LC_ALL, '')

to get things set up initially, so we can properly retrieve the language
to go with the encoding on the subsequent setlocale() call.
2020-09-14 15:16:26 +01:00
Athanasius 735e37e10e Revert is_horizons to modules: MAP_STR_ANY as it works 2020-09-14 13:32:06 +01:00
Athanasius d45070c249 plugins/eddn: Tweak ships/modules in export of shipyard and outfitting from CAPI
There are cases where a station/FC doesn't have outfitting modules or a
ships list.  Let's make the checks happen in both those functions and be
extra paranoid with some logging.

Closes #671
2020-09-14 13:26:20 +01:00
Athanasius 44353b668e Update translations.
I meant to do this for 4.1.0-beta4, so let's try and make sure it's in
the next (pre-)release.
2020-09-11 16:48:20 +01:00
Athanasius 13f7ccc87a Pre-Release 4.1.0-beta4 Release/4.1.0-beta4 2020-09-11 14:28:25 +01:00
Athanasius 057a95f5fd Merge pull request #696 from EDCD/fix/edmc-eddn-import
Fix/edmc eddn import
2020-09-11 14:21:16 +01:00
Athanasius 3556808606 Remove flake8-pep3101, we're using flake8-use-fstrings instead 2020-09-11 14:18:44 +01:00
Athanasius 5effee0d67 Merge pull request #695 from EDCD/enhancement/515-ui-scaling
Scale versus the startup default value.
2020-09-11 14:16:18 +01:00
Athanasius 17e65ae411 Update flake8/isort/etc versions.
Using older versions meant isort didn't pay attention to control
comments for the fixes in EDMC.py.
2020-09-11 14:10:56 +01:00
Athanasius f73a372e6b EDMC.py: Correct import eddn position, with isort comments
isort thinks this is a STDLIB import, when it's actually from the
plugins directory.  So add comments to stop isort from re-ordering it.
2020-09-11 14:09:47 +01:00
Athanasius cd24db88a9 UI Scaling: Size the Scale bar as per our startup value
If we use the last configured value then the width of the Scale bar
changes as per the user's last setting, even though they might not have
yet restarted for all the rest of the UI to resize.
2020-09-11 11:14:19 +01:00
Athanasius 5f759ee2d3 UI Scaling: Update translation now that 100 is default. 2020-09-11 09:29:00 +01:00
Athanasius 0a5bbad55b UI Scaling: Change our %age scaling to be relative to base tk-scaling
So if at startup tk-scaling is 1.33 then a user configured 200(%) will
set it to 2.66 for this run.

* Low end of scale bar set to 10, not 0, because now 0 makes absolutely
  no sense.
* In theory the width of the scale bar, in pixels, is now also correctly
  scaled.
2020-09-11 09:26:01 +01:00
Athanasius 4d3f9264f2 PLUGINS.md: Correct example to 'tkinter' not 'Tkinter'. 2020-09-10 18:31:09 +01:00
Athanasius 1c62cfaf4a Merge pull request #694 from EDCD/enhancement/locale-logging-and-in-issue
Log locale settings at start & ask in bug template.
2020-09-10 17:58:10 +01:00
Athanasius 575acb3006 Log locale settings at start & ask in bug template. 2020-09-10 17:52:08 +01:00
Athanasius 1b226f8e08 Pre-Release 4.1.0-beta3 Release/4.1.0-beta3 2020-09-10 17:21:30 +01:00
Athanasius 95100ad586 Merge pull request #693 from EDCD/enhancement/515-ui-scaling
Change UI tk.Scale() to use integers to avoid locale issues.
2020-09-10 17:11:50 +01:00