Commit Graph
6677 Commits
Author SHA1 Message Date
Athanasius 80e2aee6bb updates: Add comment about 'early' import update working after all
Tested both under PyCharm debugging for 'internal', and py2exe-build .exe
for 'external'.  In both cases the 'Help' > 'Check for updates...' works.
2022-12-30 18:17:01 +00:00
Athanasius 449e3e4ddc update.py: Log when internal check finds no new version
It just makes quick debugging easier.
2022-12-30 18:13:57 +00:00
Athanasius ce4ae74434 update checks: Move setup of self.updater before menu entry
Typing this as `update.Updater | None` and having the check
`if self.updater is not None:` causes the menu entry to not even get added,
because `import update` was coming later.

I can't recall why that import/setup was later, but I might be about to find
out again....
2022-12-30 18:10:36 +00:00
Athanasius 7e6f3251bb Merge pull request #1703 from EDCD/enhancement/64-bit
Make runnable under 64-bit Python
2022-12-30 16:57:29 +00:00
Athanasius 468a9effe5 companion.py: Minor typing cleanup 2022-12-30 16:47:02 +00:00
Athanasius 6b9ec285fd plug.py: Use x if x else y not or , & small type cleanup 2022-12-30 16:43:58 +00:00
Athanasius 3f91e57c7c plugins/eddb: Fix journal_entry() and new_data types
plug.py does `dict(entry)` before calling a plugin's `journal_entry()`, so
`dict` is correct for `data`.  Thus also use that for `new_data`'s type.
2022-12-30 16:34:17 +00:00
Athanasius 0fe5e17b65 CAPI: Fix dump_capi_data() for /fleetcarrier
Still produces the system/station:

    `HIP 10792.Crimson Exchange.2022-12-30T16.22.39.json`

But now also the FC:

    `FleetCarrier.X3F-N5Z.2022-12-30T16.24.01.json`
2022-12-30 16:25:25 +00:00
Athanasius 74b070ffe9 Merge pull request #1773 from aussig/feature/847/capi-fleetcarrier
Feature/847/capi fleetcarrier
2022-12-30 16:15:37 +00:00
aussig 933520c5af Switch to using a bool config value for fleetcarrier CAPI instead of int 2022-12-30 15:39:32 +00:00
aussig 4a2401983d Add preference for enabling / disabling CAPI fleetcarrier endpoint 2022-12-29 14:50:34 +00:00
Athanasius 0b2b29f21b Merge pull request #1785 from EDCD/dependabot/pip/develop/coverage-toml--7.0.1
build(deps-dev): bump coverage[toml] from 7.0.0 to 7.0.1
2022-12-28 12:16:41 +00:00
Athanasius 29022a3214 Merge pull request #1784 from EDCD/dependabot/pip/develop/pre-commit-2.21.0
build(deps-dev): bump pre-commit from 2.20.0 to 2.21.0
2022-12-28 12:16:34 +00:00
Athanasius 92f41f034b Merge pull request #1787 from EDCD/submodule-change/3793869747
[Auto-generated] Submodule Updates 3793869747
2022-12-28 12:16:21 +00:00
github-actions 72c57900d2 updating submodules 2022-12-28 12:11:52 +00:00
Athanasius 18833c5e36 plugins: Comment *why* the "load plugins that are packages" first is there
It's *NOT* that it will actually load the plugin *as* a package, as the code
explicitly only loads `load.py` still.
2022-12-26 19:48:38 +00:00
dependabot[bot] 95f6e0f7a0 build(deps-dev): bump coverage[toml] from 7.0.0 to 7.0.1
Bumps [coverage[toml]](https://github.com/nedbat/coveragepy) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/7.0.0...7.0.1)

---
updated-dependencies:
- dependency-name: coverage[toml]
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 17:01:13 +00:00
dependabot[bot] 20166f402f build(deps-dev): bump pre-commit from 2.20.0 to 2.21.0
Bumps [pre-commit](https://github.com/pre-commit/pre-commit) from 2.20.0 to 2.21.0.
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pre-commit/pre-commit/compare/v2.20.0...v2.21.0)

---
updated-dependencies:
- dependency-name: pre-commit
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 17:01:07 +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 754367618f.
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 ec90912d31 Build: Don't enforce any bit-ness of platform
Testing shows this branch works (after build) on both 32-bit and 64-bit.
2022-12-23 17:34:58 +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
Athanasius 08d28c6f3d protocol: Properly prototype GetMessageW & comment about 'exception'
* In trying to fix the return type 'exception' I first decided to properly
  prototype GetMessageW().
* But it turns out that you just can't get rid of that exception, so I just
  added a comment about it being harmless, because the functionality works
  as intended anyway.
2022-12-23 16:41:07 +00: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 7620bcdaaa Revert "TEMPORARY: Ignore venv-3.11_64 in LANG comment hook"
This reverts commit af785457ed.
2022-12-23 15:45:03 +00:00
Athanasius b678985fa6 github: windows-build: Use x64 versions of WinSparkle files 2022-12-23 15:45:02 +00:00
Athanasius 3a8f3d6297 Build: Switch to requiring 64-bit, not 32-bit, Python 2022-12-23 15:45:01 +00:00
Athanasius cdb61bcced stats.py: Checking CAPI lastStarport is un-necessary, as never used.
The `lastSystem` *is* however used, for the 'current ship not currently
docked' case.
2022-12-23 15:44:42 +00:00
Athanasius f9d384cc6d prefs.py: Comment why except OSError being thrown away (wine check) 2022-12-23 15:44:41 +00:00
Athanasius 12b77f696b prefs.py: Remove the now un-used ctypes imports/definitions 2022-12-23 15:44:40 +00:00
Athanasius 09ecdbb849 prefs.py: Always use tkinter.filedialog for Output File Location
* I can't even get this code to be problematic, with a folder containing
  unicode heart characters, on 64-bit Python 3.7.9 (Release/4.1.6 adjusted to
  not set UTF-8 locale), let alone on 64-bit Python 3.11 and this branch.

  So, just always use the tkinter dialog.  Bye-bye ctypes code which I just
  couldn't get to work under 64-bit Python.

* I *think* the issue with the ctypes code was that under 32-bit an 'int' and
  a pointer are the same size.

  'Raw' (not declaring types beforehand) the `SHBrowseForFolderW()` function
  causes ctypes to consider it returns an int.  This works on 32-bit.

  But on 64-bit that int is still 32-bits, but pointers are 64-bit, so ctypes
  ends up coercing/casting/truncating the returned pointer into an int,
  which than can't even be cast back to a pointer.

  Meanwhile, attempting to properly define the signature of the function
  has only lead to it crashing on invocation, despite being passed the same
  BROWSEINFOW structure, defined in the same manner.  This might be a matter
  of a type within it needing adjusting, but I was following the docs there.
2022-12-23 15:44:39 +00:00
Athanasius da530f135e prefs.py: Attempting to fix non-utf-8 case of "choose Output file location"
1. `SHGetPathFromIDListW` needing fixing, which was achieved, but...
2. ... then `SHBrowseForFolderW()` as-was returned `int` instead of a pointer
  to the correct structure.

Trying to fix 2 has proven intractable:

a. Trying to cast the `int` return just results in `exception: access violation
  reading <address>`.
b. Trying to define `SHBrowseForFolderW` properly, so it returns the correct
  type results in a *writing* access violation when called, despite passing
  the exact same data in as for the 'raw' call version.

So, this commit is a record, and I'm next going to try switching to
`IFileDialog` as recommended by the docs for `SHBrowseForFolderW` ('For
Windows Vista or later').
2022-12-23 15:44:38 +00:00