1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 09:32:23 +03:00

5198 Commits

Author SHA1 Message Date
aussig
4a2401983d Add preference for enabling / disabling CAPI fleetcarrier endpoint 2022-12-29 14:50:34 +00:00
aussig
16055a311f Typo in plugins docs 2022-12-26 11:23:44 +00:00
aussig
f6f122072b Tweaks to plugins docs for fleetcarrier CAPI, including headings, typos and clarity on legacy galaxy 2022-12-26 11:20:37 +00:00
aussig
1c39ca5eb9 Merge branch 'develop' into feature/847/capi-fleetcarrier 2022-12-24 10:38:22 +00:00
aussig
fc80d8ffd6 Revert "Fix for exceptions thrown on journal events"
This reverts commit 754367618ff273b94ae459544a7c73b86a182499.
2022-12-24 10:18:37 +00:00
Athanasius
81a8122c59
Indent if err: check after plugin dashboard invocation
Adding a mypy-make-happy conditional on the call above means `err` needs
to be inside that as well.
2022-12-24 10:15:41 +00:00
Athanasius
5d1eb9e3b1
Fix "could be None" conditional for call to plug.notify_journal_entry()
In testing the *first* hit on this does have `monitor.cmdr` set, but neither
`monitor.system` or `monitor.station`.  So:

1. Allow those to be `None` in the function signature,
2. Guard against only `monitor.cmdr` being falsey before the call.
3. Move the `if err:` to the same scope.
2022-12-24 10:11:11 +00:00
aussig
e22fa7c23b Store cmdr name at request time in CAPIData instead of passing into EDMCCAPIRequest and EDMCCAPIResponse 2022-12-24 09:32:45 +00:00
aussig
754367618f Fix for exceptions thrown on journal events 2022-12-24 09:27:18 +00:00
aussig
41962663d8 Merge branch 'develop' into feature/847/capi-fleetcarrier 2022-12-24 08:21:18 +00:00
Athanasius
5d5b091d2c
Merge pull request #1782 from EDCD/dependabot/pip/develop/flake8-isort-6.0.0
build(deps-dev): bump flake8-isort from 5.0.3 to 6.0.0
2022-12-23 17:32:49 +00:00
Athanasius
d3653c6626
Merge pull request #1781 from EDCD/enhancement/github/mypy-checks-linux
Make mypy happy on linux
2022-12-23 17:32:38 +00:00
dependabot[bot]
f2b18ed871
build(deps-dev): bump flake8-isort from 5.0.3 to 6.0.0
Bumps [flake8-isort](https://github.com/gforcada/flake8-isort) from 5.0.3 to 6.0.0.
- [Release notes](https://github.com/gforcada/flake8-isort/releases)
- [Changelog](https://github.com/gforcada/flake8-isort/blob/master/CHANGES.rst)
- [Commits](https://github.com/gforcada/flake8-isort/compare/5.0.3...6.0.0)

---
updated-dependencies:
- dependency-name: flake8-isort
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-23 17:01:02 +00:00
A_D
ca915782f6
hotkey: add sys.platform guards to all files
This both makes mypy happy and ensures that the wrong file is not
imported in the wrong place
2022-12-23 19:01:02 +02:00
A_D
4527177f9b
config/linux.py: Removed List and Optional usage
Missed these in the initial PR -- using the python 3.10 versions
2022-12-23 18:33:47 +02:00
A_D
a930f5b902
protocol.py: Make mypy happy
This adds an assert that mypy will understand, and a type ignore because
it seems to ignore those asserts in imports
2022-12-23 18:25:14 +02:00
A_D
f94072a99e
EDMarketConnector.py: Guard platform specific func
Some callback functions are only used on windows, but defined for
everyone, this causes mypy to fail in fun ways.
2022-12-23 18:17:33 +02:00
A_D
490bd9dbdd
hotkeys/windows.py: Add explicit platform check 2022-12-23 18:07:39 +02:00
A_D
470c9b2728
hotkey/linux.py: Update stub
This was missing some abstract methods
2022-12-23 18:02:55 +02:00
A_D
fa99225b95
myNotebook.py: Make platform check simpler
Mypy does not appear to understand the `x in ...` format for this chech
2022-12-23 17:56:44 +02:00
A_D
5dd2287e68
build: add "dumb" platform check for mypy
Mypy doesn't understand some clever version checks. This adds an
otherwise un-needed assert to force mypy to ignore the file on linux
2022-12-23 17:55:23 +02:00
A_D
50dd603520
tests/config: Disable mypy on _old_config.py
This file is just for regression testing and will never be typed
correctly, which is why we no longer use it :D
2022-12-23 17:53:58 +02:00
A_D
876afafcac
config/linux.py Fix mypy complaints
This wasn't updated to note optionals when the parent base class was
2022-12-23 17:49:07 +02:00
Athanasius
f6c6281ac2
Merge pull request #1780 from EDCD/enhancement/github/mypy-checks
mypy: Add script to run against all, and use in github/push-checks
2022-12-23 15:34:44 +00:00
Athanasius
db956cd68b
scripts/mypy-all: Add a little comment documentation 2022-12-23 15:32:09 +00:00
Athanasius
3d53b1a54d
github/mypy: Specifically run for win32 platform 2022-12-23 15:24:45 +00:00
Athanasius
2315168b65
Merge branch 'enhancement/github/mypy-checks' of https://github.com/EDCD/EDMarketConnector into enhancement/github/mypy-checks 2022-12-23 15:20:58 +00:00
A_D
862565e955
github/push-checks: set mypy-all script to be +x 2022-12-23 17:18:56 +02:00
Athanasius
e70b3c99f2
github/push-checks: Correct the job name, from build 2022-12-23 15:18:32 +00:00
Athanasius
8bacbf77ff
github/push-checks: Run on any branch except main, stable, beta, releases 2022-12-23 15:11:56 +00:00
Athanasius
841ae2006e
mypy: Add script to run against all, and use in github/push-checks 2022-12-23 15:06:47 +00:00
Athanasius
99858116e5
Merge pull request #1779 from EDCD/fix/mypy/all-files--again
Get all code passing `pre-commit run --all-files mypy`
2022-12-23 14:50:46 +00:00
Athanasius
a499a22383
.mypy.ini: Set follow_imports explicitly to normal default
We'd been using `skip` because when we started with mypy next to nothing
passed it, and checking one file would spew errors with other files and it
just wasn't conducive to making at least *some* progress.

But now we should have every single file passing, so this is the right thing
to do.
2022-12-23 14:48:27 +00:00
Athanasius
90183554ef
tests/journal_lock: Use proper pytest types in fixtures
When I last typed this I couldn't find any official way to type `pytest`
fixtures.  Perhaps that was before:

    https://docs.pytest.org/en/6.2.x/changelog.html#improvements

which now makes it clean and simple.
2022-12-23 14:48:26 +00:00
Athanasius
5064b10744
Bring in scripts/pip_rev_deps.py
* This finds the pip-installed modules that depend on the specified module.
  Handy for cleaning things up.
* Leads to needing types-pkg-resources for mypy (and via pre-commit).
2022-12-23 14:48:21 +00:00
Athanasius
bc5cb48f8c
stats.py: Remove usage of un-necessary typing types.
Dict, List, Optional
2022-12-23 14:47:41 +00:00
Athanasius
5e19d3e9aa
plugins/eddn: No need for typing.(Dict|List) usage 2022-12-23 14:47:40 +00:00
Athanasius
8a7a0fdf9a
hotkey/windows: Remove un-necessary u tagging of strings 2022-12-23 14:47:39 +00:00
Athanasius
fe5f68763b
docs/Releasing: Remove paste error 2022-12-23 14:47:38 +00:00
Athanasius
299b42c558
config/__init__: Remove use of typing.List 2022-12-23 14:47:37 +00:00
Athanasius
1e0d99a61f
config/__init__: Remove use of typing.Union 2022-12-23 14:47:36 +00:00
Athanasius
b3719347e8
EDMarketConnector: No need for Typing.Dict 2022-12-23 14:47:35 +00:00
Athanasius
5609b908fb
ttkHyperlinkLabel: Remove un-used typing.Optional import 2022-12-23 14:47:34 +00:00
Athanasius
46d518986c
hotkey/windows: Minor formatting cleanups 2022-12-23 14:47:33 +00:00
Athanasius
63a1337bed
examples/click_counter: Minor type fixes. 2022-12-23 14:47:32 +00:00
Athanasius
eaaa6fead0
Correctly type theme ui_scale variables
Technically `theme.startup_ui_scale` should be `float` to match with
`default_ui_scale` from tkinter, but we store it in the config as `int`,
so go with that.
2022-12-23 14:47:31 +00:00
Athanasius
4de83747f8
EDMarketConnector: More minor type fixes
Also, the killswitch popup ends up un-themed *anyway*, so don't even call
`theme.apply()`.  That function expects a `tk.Tk` not, `Toplevel`, and
doesn't even do anything for a `Toplevel` anyway.
2022-12-23 14:47:30 +00:00
Athanasius
69d764c027
EDMarketConnector: More misc type fixes 2022-12-23 14:47:29 +00:00
Athanasius
e45a89d970
EDMarketConnector.py: Minor type fixes & ttkHyperlink.py too 2022-12-23 14:47:28 +00:00
Athanasius
37b054b3d3
Fix type of master passed to plug.load_plugins() 2022-12-23 14:47:27 +00:00