Commit Graph
55 Commits
Author SHA1 Message Date
David Sangrey 0c022b76b1 Refactor 3 more files 2026-06-09 18:56:03 -04:00
David Sangrey decd9e3c6a Remove oldstyle union typings 2026-06-06 15:53:48 -04:00
David Sangrey ef8ba7b11f Hand Over OS to Pathlib where possible 2026-06-06 14:24:44 -04:00
David Sangrey 20ea187f00 [PRE-RELEASE] 6.1.0-beta3 2026-01-19 00:16:43 -05:00
David Sangrey 2041b3d3d3 [Minor] Update Type Hints and Alias Usages 2025-12-01 22:04:28 -05:00
David Sangrey 23c1ec8262 [Minor] Improve Safety of Subprocess Call 2025-11-09 18:54:01 -05:00
David Sangrey 65273742d0 [#1775] Retire Usage of Assert
Removes assert statements from EDMC non-test code, paving the way to enable -OO code.
2025-04-27 21:58:01 -04:00
David Sangrey e5f99c2954 [#2228] Add SCO Module Information 2024-05-08 21:56:52 -04:00
David Sangrey 690523c916 [2228] Handle Unknown FSD Ranges 2024-05-07 16:11:30 -04:00
David Sangrey bcb8a4a999 [Fix] Unify Resources Folder 2024-01-03 19:02:15 -05:00
David Sangrey e268c248d1 [2051] Convert Pickle to Json 2023-11-17 13:19:06 -05:00
Athanasius 9377bbf225 edshipyard: Minor typing fix 2022-12-23 14:47:14 +00:00
Athanasius de9e8e944e edshipyard: cast mod_guidance instead of type ignore 2021-04-12 08:31:48 +01:00
Athanasius dbdf42bb38 edshipyard: Use pathlib.Path.open() 2021-04-12 08:31:48 +01:00
Athanasius 11fa46163a edshipyard.py: mypy lints
That __Module type might be causing more trouble than its worth.
Changing the Union to 'Any' didn't help though.
2021-04-12 08:31:48 +01:00
Athanasius 35e13defb2 edshipyard.py: Fix erroneous trailing comma
Also, although we should perhaps make some attempt to ensure the decimal
separator is always a full-stop... it turns out edsy.org doesn't
currently support importing this style anyway, so it's moot.
2021-04-12 08:31:48 +01:00
Athanasius da31886b34 edshipyard.py: flake8 lints 2021-04-12 08:31:48 +01:00
Athanasius ad8c63c64c Move util_ships.py ship_map to data.py ship_name_map
Also refactors data.py to edmc_data.py as I'm having weird issues with
PyCharm debugger not starting, and this seems to be to do with module
name clashes.
2021-04-12 08:31:47 +01:00
Athanasius b961ca814a Move edshipyard.py slot_map into data.py 2021-04-12 08:31:46 +01:00
Athanasius a09512f3b3 Mostly refactoring companion.ship_file_name() into util_ships.py
* Also prevent "You're not docked at a station!" for on_foot.
2021-04-12 08:30:51 +01:00
A_D 051245cf90 Renamed various config values to be backwards compatible 2021-04-01 14:45:48 +01:00
A_D 278480b99f replaced ors with defaults in config usage 2021-04-01 14:45:46 +01:00
Athanasius 25852997c5 Updated all source to use new config methods
# Conflicts:
#	monitor.py
2021-04-01 14:45:46 +01:00
A_D 1928379571 Removed broken link, fixed interpolation key name
Broken link didn't appear to add any further information as per
discussion in PR
2020-07-10 23:44:56 +02:00
A_D c4abe6b3ca Replaced missed modulo formatting 2020-07-10 06:01:47 +02:00
A_D a6e6b6353d Tidied regexp
Python regexps should always be held in r'' or raw strings, ensuring
that python doesn't try to expand the regexp escapes.

I also removed the escaped -, as they're only special characters in
character groups
2020-07-10 06:01:47 +02:00
A_D be9ac29a5b Replaced for x in $list with $tuple
Tuples are static and smaller memory wise
2020-07-10 06:01:47 +02:00
A_D 87ad0f3080 Replaced or magic with multiline if
Abusing ors for that is incredibly confusing.
Additionally, I replaced the .join() call with a static .format call, as
the join is confusing for no reason
2020-07-10 06:01:46 +02:00
A_D 82fce9e8c0 Replaced modulo string interpolation with .format
.format is newer and easier to read
2020-07-10 06:01:46 +02:00
A_D 9581ead7cc Fixed inline comments using tabs for separation
Two spaces after tabs, according to flake8
2020-07-10 06:01:45 +02:00
A_D 7879a803e1 Replaced bare except clauses with except Exception
Catching SystemExit and KeyboardInterrupt is bad.
2020-07-10 06:01:45 +02:00
A_D 11df049d0c Added line breaks where logical
Line breaks after scope change helps to wrap your head around code
2020-07-10 06:01:44 +02:00
A_D b2ae2c1ecf Removed oneliners
Oneline ifs are against pep8 and are a pain to read.
2020-07-10 06:01:44 +02:00
A_D 5df8ce36b7 Cleaned class_rating closure
This replaces a bunch of repeated string concats with a single string
concat and string interpolation. It also does a little bit of type
hinting as I needed to see what was used where
2020-07-10 06:01:44 +02:00
Athanasius e51b4f5c68 Cleanup of EDMC.py and related code. All flags tested.
Mostly the usual file-mode versus .encode('utf-8') tweaks, but also
one list() needed around a <dict>.values().
2019-09-26 11:40:42 +01:00
Athanasius e9931aa348 Initial work on getting the EDMC.py CLI to work under python3
*) Fix up print usage
  *) cPickle -> cpickle
  *) "EDMC.py -p <cmdr name>" appears to have never been properly
  updated for multi-account support.
2019-09-26 11:40:42 +01:00
Jonathan Harris 9ced79f077 Add 3.1 ships and modules 2018-07-08 01:04:04 +01:00
Jonathan Harris 0eaa61bdd9 Make system and station info websites configurable 2018-04-03 01:03:07 +01:00
Jonathan Harris b102b8c5b8 Sanitise ship loadout file names
Fixes #303
2018-03-18 11:48:04 +00:00
Jonathan Harris 88f323d36e Switch EDShipyard import to Loadout event 2018-02-18 02:38:30 +00:00
Jonathan Harris 44f3025cc6 Handle non-ASCII Cmdr and ship names in command-line output 2017-11-17 18:38:59 +00:00
Jonathan Harris 0f147e516e Add ship name to EDShipyard export 2017-10-31 10:58:14 +00:00
Jonathan Harris 21e8b2ffee Account for engineers' mods in calculating mass and jump range 2017-09-05 19:04:58 +01:00
Jonathan Harris 6ffcfc74a1 Send 2.4-style mod info to EDShipyard and Coriolis 2017-08-24 19:36:49 +01:00
Jonathan Harris efc1cb33b6 Use new Beta universe Companion API server. 2017-06-16 18:22:00 +01:00
Jonathan Harris 1802ffb31c Handle removal of fuel and cargo capacity from API 2017-04-12 01:00:53 +01:00
Jonathan Harris 0b486ae627 Add Module Reinforcement Package in E:D 2.2.03 2017-01-12 19:56:49 +00:00
Jonathan Harris 1f6a5883b7 Support Coriolis as an option for Ship link
Also switch to common loadout format with E:D Shipyard.
2016-11-22 00:52:30 +00:00
Jonathan Harris 170d1435fb Default loadout format is now Companion API json 2016-11-20 00:35:39 +00:00
Jonathan Harris f790468078 Move functions that manipulate API output 2016-11-19 17:21:39 +00:00