tradedangerous 11.4.0__tar.gz → 11.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of tradedangerous might be problematic. Click here for more details.

Files changed (97) hide show
  1. {tradedangerous-11.4.0/tradedangerous.egg-info → tradedangerous-11.5.0}/PKG-INFO +1 -1
  2. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/setup.py +1 -1
  3. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tests/test_bootstrap_commands.py +1 -1
  4. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/cache.py +1 -1
  5. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/buy_cmd.py +1 -1
  6. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/commandenv.py +7 -0
  7. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/exceptions.py +3 -3
  8. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/parsing.py +1 -1
  9. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/shipvendor_cmd.py +1 -1
  10. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/fs.py +7 -7
  11. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/jsonprices.py +1 -1
  12. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/misc/progress.py +17 -17
  13. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/plugins/eddblink_plug.py +16 -16
  14. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/plugins/spansh_plug.py +270 -85
  15. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/submit-distances.py +1 -1
  16. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/templates/TradeDangerous.sql +4 -4
  17. tradedangerous-11.5.0/tradedangerous/templates/database_changes.json +6 -0
  18. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/tradecalc.py +1 -1
  19. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/tradeenv.py +5 -5
  20. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/transfers.py +5 -5
  21. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/version.py +1 -1
  22. {tradedangerous-11.4.0 → tradedangerous-11.5.0/tradedangerous.egg-info}/PKG-INFO +1 -1
  23. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous.egg-info/SOURCES.txt +2 -1
  24. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/LICENSE +0 -0
  25. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/README.md +0 -0
  26. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/pyproject.toml +0 -0
  27. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/setup.cfg +0 -0
  28. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tests/test_bootstrap_plugins.py +0 -0
  29. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tests/test_cache.py +0 -0
  30. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tests/test_commands.py +0 -0
  31. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tests/test_fs.py +0 -0
  32. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tests/test_peek.py +0 -0
  33. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tests/test_tools.py +0 -0
  34. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tests/test_trade.py +0 -0
  35. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tests/test_trade_run.py +0 -0
  36. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tests/test_utils.py +0 -0
  37. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/trade.py +0 -0
  38. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/__init__.py +0 -0
  39. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/cli.py +0 -0
  40. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/TEMPLATE.py +0 -0
  41. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/__init__.py +0 -0
  42. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/buildcache_cmd.py +0 -0
  43. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/export_cmd.py +0 -0
  44. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/import_cmd.py +0 -0
  45. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/local_cmd.py +0 -0
  46. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/market_cmd.py +0 -0
  47. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/nav_cmd.py +0 -0
  48. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/olddata_cmd.py +0 -0
  49. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/rares_cmd.py +0 -0
  50. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/run_cmd.py +0 -0
  51. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/sell_cmd.py +0 -0
  52. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/station_cmd.py +0 -0
  53. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/trade_cmd.py +0 -0
  54. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/update_cmd.py +0 -0
  55. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/commands/update_gui.py +0 -0
  56. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/corrections.py +0 -0
  57. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/csvexport.py +0 -0
  58. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/edscupdate.py +0 -0
  59. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/edsmupdate.py +0 -0
  60. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/formatting.py +0 -0
  61. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/gui.py +0 -0
  62. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/mapping.py +0 -0
  63. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/mfd/__init__.py +0 -0
  64. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/mfd/saitek/__init__.py +0 -0
  65. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/mfd/saitek/directoutput.py +0 -0
  66. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/mfd/saitek/x52pro.py +0 -0
  67. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/misc/checkpricebounds.py +0 -0
  68. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/misc/clipboard.py +0 -0
  69. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/misc/coord64.py +0 -0
  70. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/misc/derp-sentinel.py +0 -0
  71. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/misc/diff-system-csvs.py +0 -0
  72. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/misc/eddb.py +0 -0
  73. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/misc/eddn.py +0 -0
  74. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/misc/edsc.py +0 -0
  75. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/misc/edsm.py +0 -0
  76. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/misc/importeddbstats.py +0 -0
  77. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/misc/prices-json-exp.py +0 -0
  78. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/plugins/__init__.py +0 -0
  79. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/plugins/edapi_plug.py +0 -0
  80. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/plugins/edcd_plug.py +0 -0
  81. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/plugins/edmc_batch_plug.py +0 -0
  82. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/plugins/journal_plug.py +0 -0
  83. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/plugins/netlog_plug.py +0 -0
  84. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/prices.py +0 -0
  85. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/templates/Added.csv +0 -0
  86. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/templates/Category.csv +0 -0
  87. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/templates/RareItem.csv +0 -0
  88. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/tools.py +0 -0
  89. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/tradedb.py +0 -0
  90. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/tradeexcept.py +0 -0
  91. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous/utils.py +0 -0
  92. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous.egg-info/dependency_links.txt +0 -0
  93. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous.egg-info/entry_points.txt +0 -0
  94. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous.egg-info/not-zip-safe +0 -0
  95. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous.egg-info/requires.txt +0 -0
  96. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradedangerous.egg-info/top_level.txt +0 -0
  97. {tradedangerous-11.4.0 → tradedangerous-11.5.0}/tradegui.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tradedangerous
3
- Version: 11.4.0
3
+ Version: 11.5.0
4
4
  Summary: Trade-Dangerous is a set of powerful trading tools for Elite Dangerous, organized around one of the most powerful trade run optimizers available.
5
5
  Home-page: https://github.com/eyeonus/Trade-Dangerous
6
6
  Author: eyeonus
@@ -54,7 +54,7 @@ setup(name = package,
54
54
  ],
55
55
  license = "MPL",
56
56
  test_suite = "tests",
57
- package_data = {"tradedangerous": ["templates/TradeDangerous.sql", "templates/Added.csv", "templates/Category.csv", "templates/RareItem.csv"]},
57
+ package_data = {"tradedangerous": ["templates/TradeDangerous.sql", "templates/Added.csv", "templates/Category.csv", "templates/RareItem.csv", "templates/database_changes.json"]},
58
58
  entry_points = {
59
59
  "console_scripts": [
60
60
  "trade=trade:main",
@@ -7,7 +7,7 @@ class TestBootstrapCommands(unittest.TestCase):
7
7
 
8
8
  self.assertIn('buildcache', commands.commandIndex)
9
9
  self.assertIn('buy', commands.commandIndex)
10
-
10
+
11
11
  def test_import_buildcache_cmd(self):
12
12
  from tradedangerous.commands import buildcache_cmd
13
13
 
@@ -1005,7 +1005,7 @@ def buildCache(tdb, tdenv):
1005
1005
  importName
1006
1006
  )
1007
1007
  prog.increment(1)
1008
-
1008
+
1009
1009
  with prog.sub_task(description="Save DB"):
1010
1010
  tempDB.commit()
1011
1011
 
@@ -9,7 +9,7 @@ from .parsing import (
9
9
  NoPlanetSwitch, OdysseyArgument, PadSizeArgument, ParseArgument, PlanetaryArgument,
10
10
  )
11
11
 
12
-
12
+ # TODO: Add UPGRADE_MODE
13
13
  ITEM_MODE = "Item"
14
14
  SHIP_MODE = "Ship"
15
15
 
@@ -70,6 +70,13 @@ class CommandEnv(TradeEnv):
70
70
  the properties we have are valid.
71
71
  """
72
72
  self.tdb = tdb
73
+ db_change = pathlib.Path(self.tdb.templatePath, 'database_changes.json')
74
+ if pathlib.Path.exists(db_change):
75
+ import ijson
76
+ with open(db_change) as file:
77
+ for change in ijson.items(file, 'item'):
78
+ self.tdb.getDB().execute(change)
79
+ db_change.unlink()
73
80
 
74
81
  self.checkMFD()
75
82
  self.checkFromToNear()
@@ -7,7 +7,7 @@ from ..tradeexcept import TradeException
7
7
  class UsageError(TradeException):
8
8
  def __init__(self, title, usage):
9
9
  self.title, self.usage = title, usage
10
-
10
+
11
11
  def __str__(self):
12
12
  return self.title + "\n\n" + self.usage
13
13
 
@@ -20,7 +20,7 @@ class CommandLineError(TradeException):
20
20
  """
21
21
  def __init__(self, errorStr, usage=None):
22
22
  self.errorStr, self.usage = errorStr, usage
23
-
23
+
24
24
  def __str__(self):
25
25
  if self.usage:
26
26
  return "ERROR: {}\n\n{}".format(self.errorStr, self.usage)
@@ -36,7 +36,7 @@ class NoDataError(TradeException):
36
36
  """
37
37
  def __init__(self, errorStr):
38
38
  self.errorStr = errorStr
39
-
39
+
40
40
  def __str__(self):
41
41
  return f"""Error: {self.errorStr}
42
42
  Possible causes:
@@ -28,7 +28,7 @@ class CreditParser(int):
28
28
  'k' for thousands, 'm' for millions and 'b' for billions.
29
29
  """
30
30
  suffixes = {'k': 10**3, 'm': 10**6, 'b': 10**9}
31
-
31
+
32
32
  def __new__(cls, val, **kwargs):
33
33
  if isinstance(val, str):
34
34
  if val[-1] in CreditParser.suffixes:
@@ -208,7 +208,7 @@ def run(results, cmdenv, tdb):
208
208
  for ship in ships.values():
209
209
  if action(tdb, cmdenv, station, ship):
210
210
  dataToExport = True
211
-
211
+
212
212
  cmdenv.DEBUG0("dataToExport = {}", dataToExport)
213
213
 
214
214
  maybeExportToCSV(tdb, cmdenv)
@@ -35,7 +35,7 @@ def copy_if_newer(src, dst):
35
35
  dstPath = pathify(dst)
36
36
  if dstPath.exists() and dstPath.stat().st_mtime >= srcPath.stat().st_mtime:
37
37
  return srcPath
38
-
38
+
39
39
  shcopy(str(srcPath), str(dstPath))
40
40
  return dstPath
41
41
 
@@ -105,29 +105,29 @@ def file_line_count(from_file: PathLike, buf_size: int = 128 * 1024, *, missing_
105
105
  """ counts the number of newline characters in a given file. """
106
106
  if not isinstance(from_file, Path):
107
107
  from_file = Path(from_file)
108
-
108
+
109
109
  if missing_ok and not from_file.exists():
110
110
  return 0
111
-
111
+
112
112
  # Pre-allocate a buffer so that we aren't putting pressure on the garbage collector.
113
113
  buf = bytearray(buf_size)
114
-
114
+
115
115
  # Capture it's counting method, so we don't have to keep looking that up on
116
116
  # large files.
117
117
  counter = buf.count
118
-
118
+
119
119
  total = 0
120
120
  with from_file.open("rb") as fh:
121
121
  # Capture the 'readinto' method to avoid lookups.
122
122
  reader = fh.readinto
123
-
123
+
124
124
  # read into the buffer and capture the number of bytes fetched,
125
125
  # which will be 'size' until the last read from the file.
126
126
  read = reader(buf)
127
127
  while read == buf_size: # nominal case for large files
128
128
  total += counter(b'\n')
129
129
  read = reader(buf)
130
-
130
+
131
131
  # when 0 <= read < buf_size we're on the last page of the
132
132
  # file, so we need to take a slice of the buffer, which creates
133
133
  # a new object, thus we also have to lookup count. it's trivial
@@ -118,7 +118,7 @@ def load_prices_json(
118
118
  blackMarket = '?'
119
119
  except KeyError:
120
120
  blackMarket = '?'
121
-
121
+
122
122
  try:
123
123
  maxPadSize = stnData['mps'].upper()
124
124
  if maxPadSize not in ['S', 'M', 'L']:
@@ -73,10 +73,10 @@ class Progress:
73
73
  self.show = bool(show)
74
74
  if not show:
75
75
  return
76
-
76
+
77
77
  if style is None:
78
78
  style = DefaultBar
79
-
79
+
80
80
  self.max_value = 0 if max_value is None else max(max_value, start)
81
81
  self.value = start
82
82
  self.prefix = prefix or ""
@@ -90,23 +90,23 @@ class Progress:
90
90
  # Hide it once it's finished, update it for us, 4x a second
91
91
  transient=True, auto_refresh=True, refresh_per_second=5
92
92
  )
93
-
93
+
94
94
  # Now we add an actual task to track progress on.
95
95
  self.task = self.progress.add_task("Working...", total=max_value, start=True)
96
96
  if self.value:
97
97
  self.progress.update(self.task, advance=self.value)
98
-
98
+
99
99
  # And show the task tracker.
100
100
  self.progress.start()
101
-
101
+
102
102
  def __enter__(self):
103
103
  """ Context manager.
104
-
104
+
105
105
  Example use:
106
-
106
+
107
107
  import time
108
108
  import tradedangerous.progress
109
-
109
+
110
110
  # Progress(max_value=100, width=32, style=progress.CountingBar)
111
111
  with progress.Progress(100, 32, style=progress.CountingBar) as prog:
112
112
  for i in range(100):
@@ -114,10 +114,10 @@ class Progress:
114
114
  time.sleep(3)
115
115
  """
116
116
  return self
117
-
117
+
118
118
  def __exit__(self, *args, **kwargs):
119
119
  self.clear()
120
-
120
+
121
121
  def increment(self, value: Optional[float] = None, description: Optional[str] = None, *, progress: Optional[float] = None) -> None:
122
122
  """
123
123
  Increase the progress of the bar by a given amount.
@@ -139,30 +139,30 @@ class Progress:
139
139
  elif value:
140
140
  self.value += value # Update our internal count
141
141
  bump = True
142
-
142
+
143
143
  if self.value >= self.max_value: # Did we go past the end? Increase the end.
144
144
  self.max_value += value * 2
145
145
  self.progress.update(self.task, description=self.prefix, total=self.max_value)
146
146
  bump = True
147
-
147
+
148
148
  if bump and self.max_value > 0:
149
149
  self.progress.update(self.task, description=self.prefix, completed=self.value)
150
-
150
+
151
151
  def clear(self) -> None:
152
152
  """ Remove the current progress bar, if any. """
153
153
  # These two shouldn't happen separately, but incase someone tinkers, test each
154
154
  # separately and shut them down.
155
155
  if not self.show:
156
156
  return
157
-
157
+
158
158
  if self.task:
159
159
  self.progress.remove_task(self.task)
160
160
  self.task = None
161
-
161
+
162
162
  if self.progress:
163
163
  self.progress.stop()
164
164
  self.progress = None
165
-
165
+
166
166
  @contextmanager
167
167
  def sub_task(self, description: str, max_value: Optional[int] = None, width: int = 25):
168
168
  if not self.show:
@@ -173,7 +173,7 @@ class Progress:
173
173
  yield task
174
174
  finally:
175
175
  self.progress.remove_task(task)
176
-
176
+
177
177
  def update_task(self, task: TaskID, advance: Union[float, int], description: Optional[str] = None):
178
178
  if self.show:
179
179
  self.progress.update(task, advance=advance, description=description)
@@ -45,7 +45,7 @@ def _count_listing_entries(tdenv: TradeEnv, listings: Path) -> int:
45
45
  else:
46
46
  tdenv.DEBUG0("Listings file is empty, nothing to do.")
47
47
  return 0
48
-
48
+
49
49
  return count + 1 # kfsone: Doesn't the header already make this + 1?
50
50
 
51
51
 
@@ -94,7 +94,7 @@ class ImportPlugin(plugins.ImportPluginBase):
94
94
  def __init__(self, tdb, tdenv):
95
95
  super().__init__(tdb, tdenv)
96
96
 
97
- self.dataPath = Path(os.environ.get('TD_EDDB')) if os.environ.get('TD_EDDB') else self.tdb.dataPath / Path("eddb")
97
+ self.dataPath = os.environ.get('TD_EDDB') or self.tdenv.tmpDir
98
98
  self.categoriesPath = Path("Category.csv")
99
99
  self.commoditiesPath = Path("Item.csv")
100
100
  self.rareItemPath = Path("RareItem.csv")
@@ -166,13 +166,13 @@ class ImportPlugin(plugins.ImportPluginBase):
166
166
  """
167
167
  db = self.tdb.getDB()
168
168
  self.tdenv.NOTE("Purging Systems with no stations: Start time = {}", self.now())
169
-
169
+
170
170
  db.execute("""
171
171
  DELETE FROM System
172
172
  WHERE NOT EXISTS(SELECT 1 FROM Station WHERE Station.system_id = System.system_id)
173
173
  """)
174
174
  db.commit()
175
-
175
+
176
176
  self.tdenv.NOTE("Finished purging Systems. End time = {}", self.now())
177
177
 
178
178
  def importListings(self, listings_file):
@@ -188,9 +188,9 @@ class ImportPlugin(plugins.ImportPluginBase):
188
188
  if not total:
189
189
  self.tdenv.NOTE("No listings")
190
190
  return
191
-
191
+
192
192
  self.tdenv.NOTE("Processing market data from {}: Start time = {}. Live = {}", listings_file, self.now(), from_live)
193
-
193
+
194
194
  db = self.tdb.getDB()
195
195
  stmt_unliven_station = """UPDATE StationItem SET from_live = 0 WHERE station_id = ?"""
196
196
  stmt_flush_station = """DELETE from StationItem WHERE station_id = ?"""
@@ -253,7 +253,7 @@ class ImportPlugin(plugins.ImportPluginBase):
253
253
  transaction_items += 1
254
254
  skip_station = True
255
255
  continue
256
-
256
+
257
257
  # Unless the import file data is newer, nothing else needs to be done for this station,
258
258
  # so the rest of the listings for this station can be skipped.
259
259
  if listing_time <= last_modified:
@@ -276,7 +276,7 @@ class ImportPlugin(plugins.ImportPluginBase):
276
276
  # listings.csv includes rare items, which we are ignoring.
277
277
  if item_id not in item_lookup:
278
278
  continue
279
-
279
+
280
280
  demand_price = int(listing['sell_price'])
281
281
  demand_units = int(listing['demand'])
282
282
  demand_level = int(listing.get('demand_bracket') or '-1')
@@ -292,16 +292,16 @@ class ImportPlugin(plugins.ImportPluginBase):
292
292
  supply_price, supply_units, supply_level,
293
293
  ))
294
294
  transaction_items += 1
295
-
295
+
296
296
  # These will take a little while, which has four steps, so we'll make it a counter.
297
297
  with pbar.Progress(1, 40, prefix="Saving"):
298
298
  # Do a final commit to be sure
299
299
  cursor.execute("COMMIT")
300
-
300
+
301
301
  if self.getOption("optimize"):
302
302
  with pbar.Progress(1, 40, prefix="Optimizing"):
303
303
  db.execute("VACUUM")
304
-
304
+
305
305
  self.tdb.close()
306
306
 
307
307
  self.tdenv.NOTE("Finished processing market data. End time = {}", self.now())
@@ -370,9 +370,9 @@ class ImportPlugin(plugins.ImportPluginBase):
370
370
  if rib_path.exists():
371
371
  rib_path.unlink()
372
372
  ri_path.rename(rib_path)
373
-
373
+
374
374
  self.tdb.close()
375
-
375
+
376
376
  self.tdb.reloadCache()
377
377
  self.tdb.close()
378
378
 
@@ -432,7 +432,7 @@ class ImportPlugin(plugins.ImportPluginBase):
432
432
  if self.downloadFile(self.upgradesPath) or self.getOption("force"):
433
433
  transfers.download(self.tdenv, self.urlOutfitting, self.FDevOutfittingPath)
434
434
  buildCache = True
435
-
435
+
436
436
  if self.getOption("ship"):
437
437
  if self.downloadFile(self.shipPath) or self.getOption("force"):
438
438
  transfers.download(self.tdenv, self.urlShipyard, self.FDevShipyardPath)
@@ -468,7 +468,7 @@ class ImportPlugin(plugins.ImportPluginBase):
468
468
  self.tdb.close()
469
469
  self.tdb.reloadCache()
470
470
  self.tdb.close()
471
-
471
+
472
472
  if self.getOption("purge"):
473
473
  self.purgeSystems()
474
474
  self.tdb.close()
@@ -478,7 +478,7 @@ class ImportPlugin(plugins.ImportPluginBase):
478
478
  self.importListings(self.listingsPath)
479
479
  if self.downloadFile(self.liveListingsPath) or self.getOption("force"):
480
480
  self.importListings(self.liveListingsPath)
481
-
481
+
482
482
  if self.getOption("listings"):
483
483
  self.tdenv.NOTE("Regenerating .prices file.")
484
484
  cache.regeneratePricesFile(self.tdb, self.tdenv)