Skip to content

Commit ef6281d

Browse files
PEP fixes
Tests exclude the examples folder
1 parent 71b74c4 commit ef6281d

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/test-library.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Lint with flake8
3636
run: |
3737
# stop the build if there are Python syntax errors or undefined names
38-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
38+
flake8 . --count --select=E9,F63,F7,F82 --ignore=F405,W391,W291,C901,E501,E303,W293 --exclude=examples --show-source --statistics
3939
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
4040
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
4141
- name: Test with pytest

examples/aio_ips2firewall_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async def analyzeOrganization(aiomeraki: meraki.aio.AsyncDashboardAPI, orgId: st
2727
for e in events:
2828
ip, port = e["srcIp"].rsplit(":", 1)
2929
ip = ip.strip("[]") # remove brackets in case of ipv6
30-
if not ipaddress.ip_address(ip).is_private: # dont block private ip addresses on the public ip of the firewall
30+
if not ipaddress.ip_address(ip).is_private: # don't block private ip addresses on the public ip of the firewall
3131
ret[ip] = ret.get(ip, 0) + 1
3232

3333
return ret

examples/bulk_firmware_upgrade_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ def action_batch_runner(batch_actions_lists, org_id):
148148
responses = list()
149149
number_of_batches = len(batch_actions_lists)
150150
number_of_batches_submitted = 0
151-
wait_seconds = int(30)
152151

153152
# Make a batch for each list
154153
for batch_action_list in batch_actions_lists:
@@ -177,7 +176,8 @@ def action_batch_queue_checker(org_id):
177176

178177
while len(running_action_batches) > 4:
179178
print(
180-
f'There are already five action batches in progress with a total of {total_running_actions} running actions. Waiting {wait_seconds} seconds.')
179+
f'There are already five action batches in progress with a total of {total_running_actions} running '
180+
f'actions. Waiting {wait_seconds} seconds.')
181181
time.sleep(wait_seconds)
182182
print('Checking again.')
183183

0 commit comments

Comments
 (0)