Skip to content

Commit

Permalink
Fixed flake8 tests and improved code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
BattlefieldDuck committed Mar 15, 2024
1 parent 8014e25 commit 7329019
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ jobs:
pytest
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
FACTORIO_USERNAME: ${{ secrets.FACTORIO_USERNAME }}
FACTORIO_TOKEN: ${{ secrets.FACTORIO_TOKEN }}
5 changes: 3 additions & 2 deletions protocols/MasterServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ def _bulk_write(self, updates: list):
chunk_size = -(-len(updates) // max_workers)

# Split the updates into chunks for each worker
update_chunks = [updates[i:i + chunk_size]
for i in range(0, len(updates), chunk_size)]
update_chunks = [
updates[i:i + chunk_size]
for i in range(0, len(updates), chunk_size)]

# Initialize a progress bar for tracking the progress of the bulk write
pbar = tqdm(total=len(updates), desc=f"[{self.key}] Bulk Write")
Expand Down

0 comments on commit 7329019

Please sign in to comment.