refactoring
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from CountriesMerger import CountriesMerger
|
||||
from CountriesByBatchcodeProvider import getCountriesByBatchcodeBeforeDeletion, getCountriesByClickedBatchcode
|
||||
from BatchCodeTableFactory import BatchCodeTableFactory
|
||||
from src.CountriesColumnMerger import CountriesColumnMerger
|
||||
|
||||
class BatchCodeTableHavingGuessedCountriesFactory:
|
||||
|
||||
@@ -20,13 +21,7 @@ class BatchCodeTableHavingGuessedCountriesFactory:
|
||||
return batchCodeTable
|
||||
|
||||
def _guessCountries(self, batchCodeTable, countriesAsList):
|
||||
self._mergeCountriesOfSrcIntoDst(
|
||||
CountriesColumnMerger.mergeCountriesColumnOfSrcsIntoCountriesColumnOfDst(
|
||||
dst = batchCodeTable,
|
||||
src = self.countriesByBatchcodeBeforeDeletion)
|
||||
self._mergeCountriesOfSrcIntoDst(
|
||||
dst = batchCodeTable,
|
||||
src = self.countriesByClickedBatchcode)
|
||||
srcs = [self.countriesByBatchcodeBeforeDeletion, self.countriesByClickedBatchcode])
|
||||
BatchCodeTableFactory._convertCountries(batchCodeTable, countriesAsList)
|
||||
|
||||
def _mergeCountriesOfSrcIntoDst(self, dst, src):
|
||||
dst['Countries'] = CountriesMerger.mergeSrcIntoDst(dst = dst['Countries'], src = src['Countries'])
|
||||
|
||||
Reference in New Issue
Block a user