Athanasius
ccdc187efa
CAPI: Remove 'safeties' preventing Legacy CAPI queries
2022-12-08 11:58:34 +00:00
Athanasius
088da2e5f0
td.py: Update Price-Data format URL to github
2022-12-08 11:44:30 +00:00
Athanasius
78e9db710f
td.py: Fix 'oops' with file header wrt platform
...
Lost the `sys.platform == ` part of:
`sys.platform == 'darwin' and ...`
2022-12-08 11:42:57 +00:00
Athanasius
75ee57939a
EDMarketConnector: Force type of ship_state
...
It can be `tk.NORMAL` or `tk.DISABLED`. Why `True` was ever used I don't
know, possibly relying on undefined behaviour.
However, those 'types' end up as `Literal['normal']` and `Literal['disabled']`
and the only way to declare a Union of those is to be explicit with the
actual strings. tk.(NORMAL|DISABLED) are not a types.
2022-12-08 11:32:41 +00:00
Athanasius
6a580576ec
mpyp: Always use --check-untyped-defs
...
`mypy EDMarketConnector.py` was throwing a warning:
By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
for some things. Bizarrely including e.g.
play_bad: bool = False
2022-12-08 11:29:49 +00:00
Athanasius
b6fe115ea7
CAPI: Add support for plugin cmdr_data_legacy()
...
* Renames `plug.notify_newdata()` to the more precise `notify_capidata()`.
* If CAPI data was from SERVER_LEGACY, then use plugin `cmdr_data_legacy()`
instead of `cmdr_data()`.
2022-12-08 11:17:52 +00:00
Athanasius
b754ef8700
companion: mypy fixups & misc
...
* Some `Optiona[str]` required.
* Remove old pre-CAPIData comment about adding it
2022-12-08 11:06:43 +00:00
Athanasius
9fdf768ce3
CAPI: Enable selection of SERVER_LEGACY in capi_host_for_galaxy()
...
Also adds DEBUG logging for the selection.
2022-12-08 11:02:39 +00:00
Athanasius
0523e2289a
EDMarketConnector: Improve 'develop only for devs' check
...
* Move it later, after CLI args processing. This would allow for a magic
'override' this, providing a key or similar.
* Correct text 'XAthan' to 'Athan' in 'win32' check.
* If `git_branch != 'develop'` check if `-alpha0` is in the app version.
Such version strings are never in any pre-release or release.
2022-12-08 10:51:31 +00:00
Athanasius
0d65adb77e
EDMarketConnector: Tweak 'only developers in develop' message
2022-12-07 20:10:41 +00:00
Athanasius
a69b271928
EDMarketConnector: Only developers should be running develop
2022-12-07 19:45:55 +00:00
Athanasius
410b52979b
python: Bump to version 3.10.9
...
* And point out in ChangeLog.md that we're (still) 32-bit.
2022-12-07 17:45:56 +00:00
Athanasius
a0887f1410
Merge pull request #1742 from EDCD/enhancement/theme/use-constants-not-magic-numbers
...
themes: Use defined constants for which theme throughout
2022-12-06 15:46:50 +00:00
Athanasius
36f54ba120
Merge branch 'develop' of https://github.com/EDCD/EDMarketConnector into develop
2022-12-06 14:51:21 +00:00
Athanasius
115b5be3bf
ttkHyperlinkLabel: Just use webbrowser.open(url)
unconditionally
...
See the expanded docstring on the `openurl()` function.
2022-12-06 14:50:05 +00:00
Athanasius
5687780d65
Merge pull request #1745 from EDCD/dependabot/pip/develop/watchdog-2.2.0
...
build(deps): bump watchdog from 2.1.9 to 2.2.0
2022-12-05 17:03:48 +00:00
dependabot[bot]
2345822d07
build(deps): bump watchdog from 2.1.9 to 2.2.0
...
Bumps [watchdog](https://github.com/gorakhargosh/watchdog ) from 2.1.9 to 2.2.0.
- [Release notes](https://github.com/gorakhargosh/watchdog/releases )
- [Changelog](https://github.com/gorakhargosh/watchdog/blob/master/changelog.rst )
- [Commits](https://github.com/gorakhargosh/watchdog/compare/v2.1.9...v2.2.0 )
---
updated-dependencies:
- dependency-name: watchdog
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 17:01:31 +00:00
Athanasius
38c2f19474
eddn: Suppress "converted file" for legacy if no file
...
This was a total brainfart, `finally:` is never what was wanted here.
So, just `return` if `FileNotFoundError`.
2022-12-05 16:40:44 +00:00
Athanasius
c524dc5769
requirements-dev: Bump flake8 to 6.0.0
...
Now we have a bare `flake8` coming out clean we can upgrade to 6.0.0, which
lacks the `--diff` support we had been relying on.
2022-12-05 16:10:09 +00:00
Athanasius
21c1f07db4
Merge branch 'fix/1723/flake8-everything' into develop
2022-12-05 16:09:33 +00:00
Athanasius
5885e6698c
tests/config: flake8 6.0.0 doesn't like var-name l
...
But it's fine with `s`.
2022-12-05 16:08:00 +00:00
Athanasius
baadf10158
config/__init__: l
is too ambiguous
...
flake8 6.0.0 complained about `l` here, but strangely not the other
single-letter variable names. I figured I might as well rename those as
well.
2022-12-05 16:05:23 +00:00
Athanasius
45043d9359
theme.py: Some more tk.BitmapImage guarding, but using isinstance()
...
`type(...)` is probably incorrect, and `isinstance(...)` gets mypy to take
account of subclasses properly.
2022-12-05 15:57:17 +00:00
Athanasius
09d632bb34
theme.py: Fix up some typing issues
...
We're passing around *either* tk.Widget *or* tk.BitmapImage in places, but
tk.BitmapImage really isn't the same. It doesn't have some functions, can't
be treated as a Dict etc.
2022-12-05 15:57:16 +00:00
Athanasius
62e285b52e
themes: Use defined constants for which theme throughout
...
This has been relying on knowledge of the magic numbers for far too long.
As part of this, remove all the obfuscating "oh, default is 0, and we want
that or any other theme, so treat this like a boolean" nonsense.
Also, stop assuming that "> 1" is a synonym for "transparent theme". Just
Do The Equality Check.
2022-12-05 15:57:15 +00:00
Athanasius
0f5f625cfd
Merge pull request #1744 from EDCD/fix/1743/capi-eddn-blank-uploaderid
...
eddn: Ensure CAPI-sourced messages have uploaderID set
2022-12-05 15:56:10 +00:00
Athanasius
6bd48a163c
eddn: Ensure CAPI-sourced messages have uploaderID set
...
If no 'live' Journal events yet, plugins/eddn won't have had an event to set
this from.
2022-12-05 15:53:27 +00:00
Athanasius
3ed568e544
Merge pull request #1740 from EDCD/fix/1723/flake8-everything
...
Get everything passing flake8 checks
2022-12-05 11:05:41 +00:00
Athanasius
ab979ed043
ttkHyperlinkLabel: Use Any
where it's appropriate in function signatures
2022-12-05 10:58:16 +00:00
Athanasius
c61f235734
loadout.py: Collapse the construction of output filename
...
All the intermediate variables were more a "work in progress" thing.
Tested as still working.
2022-12-05 10:55:53 +00:00
Athanasius
e4055530b4
theme: The very start of actually using defined constants for themes
2022-12-05 10:49:05 +00:00
Athanasius
4cea8fa34f
github/push-checks: Align flake8 with what's working in pr-checks
2022-12-04 16:55:45 +00:00
Athanasius
486fb6b7e6
github/pr-checks: We provide flake8 filenames, so lose the '.'
2022-12-04 16:50:21 +00:00
Athanasius
5c704e9932
github/pr-checks: Remove stray echo
from prior testing
2022-12-04 16:49:02 +00:00
Athanasius
ccdfd9a4fa
scripts/killswitch_test: One flake8 issue fixed
2022-12-04 16:42:12 +00:00
Athanasius
a6f9a31fd9
plugins/edsy: flake8 and mypy pass
2022-12-04 16:20:08 +00:00
Athanasius
ba81d95c1e
plugins/edsm: Align comments and docstrings with plugins/eddb
2022-12-04 16:12:58 +00:00
Athanasius
73c4bcfcc7
plugins/eddb: flake8 & mypy now clean
...
* Converted to `class This` paradigm.
2022-12-04 15:57:09 +00:00
Athanasius
62ed12eba3
plugins/eddb: flake8 pass
2022-12-04 15:36:00 +00:00
Athanasius
19114fdc3a
config/linux: Remove unused TYPE_CHECKING import
2022-12-04 15:15:14 +00:00
Athanasius
c5a2943966
util_ships.py: Add required blank line before function
2022-12-04 15:14:31 +00:00
Athanasius
04145146d7
update.py: Finaly mypy pass
...
* It's possible the `xml` code could be changed to make types work. But
the code works, ignore types on those calls.
2022-12-04 15:12:46 +00:00
Athanasius
74ebba20b4
update.py: Remove unused 'global root' & some more typing
...
`global root` was never removed after `self.root` became a thing.
2022-12-04 15:08:38 +00:00
Athanasius
e419e6dca0
update.py: Technically Updater.root can be None, so check this
...
The only current users of the code that blindly uses `self.root` are for
the GUI application, but let's add the checks anyway.
2022-12-04 14:56:58 +00:00
Athanasius
3358babe00
EDMarketConnector: Move tk 'status' Label to its own section
2022-12-04 14:55:22 +00:00
Athanasius
2ac055e8f0
update.py: Yes, we have to use .nametowidget()
...
'status' is a child of 'edmarketconnector', not of `self.root`. And if
we were to do `self.root.children['edmarketconnector'].children['status']`
then we might as well use `.nametowidget()`.
2022-12-04 14:49:51 +00:00
Athanasius
eab2f35360
update.py: Minor whitespace correction
2022-12-04 14:43:00 +00:00
Athanasius
3cc9aed724
EDMarketConnector: Updated for update.py function renames
2022-12-04 14:35:49 +00:00
Athanasius
eefb56c2c0
update.py: Check appcast version is correct platform
2022-12-04 14:30:37 +00:00
Athanasius
b38044928a
update.py: Now passes flake8
...
**BUG FOUND**
The code in `Updater.check_appcast()` assumes that
`semantic_version.SimpleSpec.select()` will say "5.6.1 is an upgrade for
this 5.6.0". But it doesn't. It's looking for *matches*.
So this needs to be a proper loop/compare *and* should only take into account
options *for the current platform*.
2022-12-04 14:23:53 +00:00