1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

5375 Commits

Author SHA1 Message Date
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
Athanasius
ce4a6ff898
plugins/eddn: Remove the 'default values' from should_retrn & new_data
In *this* case the variables *are* used in the scope so become bound, so
we can get away with bare type declaration.
2022-12-23 14:47:26 +00:00
Athanasius
2c11aef1be
plugins/eddn: Use correct logging function & new_data typing
* `logger.INFO` will, at best, be a constant, it should be `logger.info()`.
* When we're not interested in the `new_data` 2nd part of the tuple from
  `killswitches.check_killswitch()` we can't use `_` as there's a potential
  class with the `l10n.py` injection of `_()` as a builtin.

  And you can't declare types withing first-use in a return-tuple. So, declare
  them on their own lines, with throwaway default values instead.
2022-12-23 14:47:25 +00:00
Athanasius
e66bae090b
plugins/inara: Minor typing fixes 2022-12-23 14:47:24 +00:00
Athanasius
71cbfb8358
plugins/edsm: Lots of type fixing, inc. conditionals where None is possible 2022-12-23 14:47:23 +00:00
Athanasius
ca233a40a8
plugins/coriolis: Minor type fixes. 2022-12-23 14:47:22 +00:00
Athanasius
f4b150960c
prefs.py & related files: Fix up mypy type checking
* Some trivial.
* As myNotebook.py's class is based on `ttk.Notebook`, typing changed to
  that.
2022-12-23 14:47:21 +00:00
Athanasius
3b0c7370cc
hotkey: Make more of the windows methods abstract ones in parent
Without this mypy objects to calling them due to not being in the visible
AbstractKetkeyMgr type.
2022-12-23 14:47:20 +00:00
Athanasius
9e605d31c7
EDMC.py: Fix up other call to companion.session.station()
* Opening of latest journal file didn't match how done in monitor.py.
  This caused `str` instead of `bytes` being passed to `monitor.parse_entry()`.
* It was assuming pre-threaded return of data.  Now properly gets it from
  the queue.
2022-12-23 14:47:19 +00:00
Athanasius
26b12f5b14
plugins/inara, plug.py: Minor typing fixes 2022-12-23 14:47:18 +00:00
Athanasius
fb065c5b78
collate.py: file paths/names should be pathlib.Path 2022-12-23 14:47:17 +00:00
Athanasius
95b442cf02
stats.py: Minor typing fixes. 2022-12-23 14:47:16 +00:00
Athanasius
7fe86c5862
companion.py: Minor typing fixes 2022-12-23 14:47:15 +00:00
Athanasius
9377bbf225
edshipyard: Minor typing fix 2022-12-23 14:47:14 +00:00
Athanasius
25dfb0588a
tests/journal_lock: Minor typing fixes. 2022-12-23 14:47:14 +00:00
Athanasius
f52ffce79f
timeout_session: Minor typing fix 2022-12-23 14:47:13 +00:00
Athanasius
872ab1b814
hotkey/darwin: No need to sys.platform gate within this
And it gets rid of a `pre-commit run --all-files mypy` error.
2022-12-23 14:47:12 +00:00
Athanasius
4041890f39
tests/config/_old_config.py: Minor typing fixes. 2022-12-23 14:47:11 +00:00
Athanasius
777b38e179
theme.py: Minor typing fix 2022-12-23 14:47:10 +00:00
Athanasius
36bd08d715
l10n.py: Two minor typing fixes 2022-12-23 14:47:09 +00:00
Athanasius
85fc308d42
outfitting.py: Correct indexing into two maps
The current data literally only uses strings as indexes.
2022-12-23 14:47:08 +00:00
Athanasius
a08eef3244
flake8, hotkey/darwin: Just ignore this file for now
It'll take digging into macOS-specific documents to type things sufficiently
to pass the flake8 TAE001 "too few type annotations" check.
2022-12-23 14:47:07 +00:00
Athanasius
f7cba59e61
hotkey: Re-factor into a module, per-arch files
This helps avoid some pre-commit/mypy carping.
2022-12-23 14:47:06 +00:00
Athanasius
d40bb4f09c
dashboard: Minor process() type fix 2022-12-23 14:47:05 +00:00
Athanasius
4db4165676
config/linux: Fix pre-commit run --all-files-only issue
When run this way mypy thinks `config.linux` has no attribute `LinuxConfig`.
2022-12-23 14:47:04 +00:00
Athanasius
acbe1231ef
EDMCLogging: loglevel is str | int 2022-12-23 14:47:03 +00:00
Athanasius
19f3df77f2
examples/click_counter: Types *should* be fixed up
NB: Didn't run this at all to test.
2022-12-23 14:47:02 +00:00
Athanasius
3ed84bcad8
examples/plugintest: Drop the 'pre-5.0.0' config fixups
It's a pain for typing, and should be long since irrelevant.
2022-12-23 14:47:01 +00:00
Athanasius
d76e827dc5
config/windows: Fix up types 2022-12-23 14:47:00 +00:00
Athanasius
5f4f524fec
And update reference to renamed coriolis.py in docs/Releasing.md 2022-12-23 14:46:59 +00:00
Athanasius
7440c9a064
Renamed coriolis.py so it'll never clash with plugins/coriolis.py 2022-12-23 14:46:58 +00:00
Athanasius
61bdb54eb1
.mypy.ini: Add --explicit-package-bases to help with pre-commit invocation 2022-12-23 14:46:57 +00:00
Athanasius
48763890fe
config: Fix "could be None" types in __init__.py 2022-12-23 14:46:56 +00:00
Athanasius
204ded5b10
pre-commit: Add types-urllib3 to additional_dependencies
It's in `pip freeze | grep types`, so might as well be explicit.
2022-12-23 14:46:55 +00:00
aussig
3c8eca16af Revert unnoticed whitespace modifications to PLUGINS.py 2022-12-23 13:01:47 +00:00
aussig
7e726e606a Store original request cmdr name in 'request_cmdr' in CAPIData 2022-12-23 12:47:35 +00:00
Athanasius
553c9012f7
Merge pull request #1768 from EDCD/dependabot/pip/develop/coverage-toml--7.0.0
build(deps-dev): bump coverage[toml] from 6.5.0 to 7.0.0
2022-12-22 17:45:22 +00:00
aussig
3e295db061 Typing of return values from killswitch.check_killswitch() 2022-12-22 17:39:20 +00:00
dependabot[bot]
07474304cf
build(deps-dev): bump coverage[toml] from 6.5.0 to 7.0.0
Bumps [coverage[toml]](https://github.com/nedbat/coveragepy) from 6.5.0 to 7.0.0.
- [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/6.5.0...7.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-22 17:35:52 +00:00
Athanasius
81b19824ba
Merge pull request #1778 from EDCD/dependabot/pip/develop/types-requests-2.28.11.7
build(deps-dev): bump types-requests from 2.28.11.6 to 2.28.11.7
2022-12-22 17:35:21 +00:00
Athanasius
bf54569fda
Merge pull request #1776 from EDCD/dependabot/pip/develop/isort-5.11.4
build(deps-dev): bump isort from 5.11.3 to 5.11.4
2022-12-22 17:35:15 +00:00
Athanasius
dbb15229a4
Merge pull request #1777 from EDCD/dependabot/pip/develop/coverage-conditional-plugin-0.8.0
build(deps-dev): bump coverage-conditional-plugin from 0.7.0 to 0.8.0
2022-12-22 17:34:54 +00:00
dependabot[bot]
70a9609ef0
build(deps-dev): bump types-requests from 2.28.11.6 to 2.28.11.7
Bumps [types-requests](https://github.com/python/typeshed) from 2.28.11.6 to 2.28.11.7.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-22 17:01:12 +00:00
dependabot[bot]
62b0a392bd
build(deps-dev): bump coverage-conditional-plugin from 0.7.0 to 0.8.0
Bumps [coverage-conditional-plugin](https://github.com/wemake-services/coverage-conditional-plugin) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/wemake-services/coverage-conditional-plugin/releases)
- [Changelog](https://github.com/wemake-services/coverage-conditional-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/wemake-services/coverage-conditional-plugin/compare/0.7.0...0.8.0)

---
updated-dependencies:
- dependency-name: coverage-conditional-plugin
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-22 17:01:04 +00:00
dependabot[bot]
3c0d7d1c0a
build(deps-dev): bump isort from 5.11.3 to 5.11.4
Bumps [isort](https://github.com/pycqa/isort) from 5.11.3 to 5.11.4.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.11.3...5.11.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-22 17:00:59 +00:00
aussig
9e17c46b25 Implement suggestions from PR #1773. 2022-12-22 16:21:42 +00:00
aussig
cb2a6b6995 Merge branch 'develop' into feature/847/capi-fleetcarrier 2022-12-22 15:32:17 +00:00
Athanasius
292b449cf6
Fix up companion.Session.close() refactor
* When PyCharm made a mess I accidentally undid two renames in
  EDMarketConnector.py...
* ... but one of those actually *does* need to only close the session.  So
  made a new Session.close() that performs only the closing, with
  Session.reinit_session() now utilising that.
2022-12-22 09:15:16 +00:00