Skip to content

Commit

Permalink
Type
Browse files Browse the repository at this point in the history
  • Loading branch information
hildogjr committed Aug 13, 2019
1 parent bac006e commit 7e0053d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion kicost/distributors/api_partinfo_kitspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class api_partinfo_kitspace(distributor_class):
def init_dist_dict():
from .distributors_info import distributors_info
api_distributors = ['digikey', 'farnell', 'mouser', 'newark', 'rs']
print({k:v for k,v in distributors_info.items() if k in api_distributors})
dists = {k:v for k,v in distributors_info.items() if k in api_distributors}
if not 'enabled' in distributors_modules_dict['api_partinfo_kitspace']:
# First module load.
Expand Down
4 changes: 2 additions & 2 deletions kicost/distributors/dist_local_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ def query_part_info(parts, distributors, currency=DEFAULT_CURRENCY):
distributors[dist]['label']['name'] = dist # Set dist name for spreadsheet header.

# Set part info to default blank values for all the distributors.
for part in parts:
for part in parts: ## TODO create this for just the current active distributor inside each module.
# These bellow variable are all the data the each distributor/local API/scrap module needs to fill.
part.part_num = {dist: '' for dist in distributors} # Ditributor catalogue number.
part.part_num = {dist: '' for dist in distributors} # Distributor catalogue number.
part.url = {dist: '' for dist in distributors} # Purchase distributor URL for the spefic part.
part.price_tiers = {dist: {} for dist in distributors} # Price break tiers; [[qty1, price1][qty2, price2]...]
part.qty_avail = {dist: None for dist in distributors} # Available quantity.
Expand Down
2 changes: 1 addition & 1 deletion kicost/kicost.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def kicost(in_file, eda_name, out_filename,
# Get the distributor pricing/qty/etc for each part.
if dist_list:
# Set part info to default blank values for all the distributors.
for part in parts:
for part in parts: ## TODO create this for just the current active distributor inside each module.
# These bellow variable are all the data the each distributor/local API/scrap module needs to fill.
part.part_num = {dist: '' for dist in dist_list} # Ditributor catalogue number.
part.url = {dist: '' for dist in dist_list} # Purchase distributor URL for the spefic part.
Expand Down

0 comments on commit 7e0053d

Please sign in to comment.