From 4e2e160072f51d422f448ea1192067300ba29f63 Mon Sep 17 00:00:00 2001 From: mm Date: Fri, 5 May 2023 05:43:15 +0000 Subject: [PATCH] linting --- Makefile | 2 +- generate_data.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d646f65..90bb694 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ lint: @echo "Auto-linting files and performing final style checks..." @isort --profile=black . @black . - @flake8 --max-line-length=88 . + @flake8 --max-line-length=88 --ignore E203 . check: lint @echo "Checking for unstaged or untracked changes..." diff --git a/generate_data.py b/generate_data.py index 0f12e05..cfe8e9a 100644 --- a/generate_data.py +++ b/generate_data.py @@ -105,6 +105,7 @@ def calculate_distance(pair): distance = get_distance(city1["name"], city2["name"]) return city1["name"], city2["name"], distance + def main(): cities = list(us_cities.values()) print(f"Num cities: {len(cities)}") @@ -121,7 +122,7 @@ def main(): try: executor = concurrent.futures.ProcessPoolExecutor(max_workers=args.workers) for i in range(num_chunks): - chunk = city_combinations[i * chunk_size : (i + 1) * chunk_size] + chunk = city_combinations[(i * chunk_size) : (i + 1) * chunk_size] futures = { executor.submit(calculate_distance, pair): pair for pair in chunk }