Skip to content

Commit 69d97f0

Browse files
Added Python functions
1 parent 9262158 commit 69d97f0

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/docs-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ jobs:
2424
2525
- name: Run Documentation Checks
2626
run: |
27-
flake8 --select=D connect_routers.py
27+
flake8 --select=D sample.py
2828

connect_routers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def load_router_details(yaml_file):
66
return yaml.safe_load(file)
77

88
def connect_to_router(router):
9-
"""Connect to routers and get hostname."""
9+
"""Simulate connecting to a router and print its details."""
1010
print(f"Connecting to {router['hostname']} at {router['ip']}...")
1111
print(f"Using username: {router['username']}")
1212
print(f"Enable password: {router['enable_password']}")

sample.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
def add_numbers(a, b):
2+
"""
3+
Adds two numbers and returns the result.
4+
5+
Args:
6+
a (int): The first number.
7+
b (int): The second number.
8+
9+
Returns:
10+
int: The sum of a and b.
11+
"""
12+
return a + b
13+
14+

0 commit comments

Comments
 (0)