Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing linting pointed by black #46

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: Lint code in repository
"on":
push:
Expand Down
24 changes: 17 additions & 7 deletions example-black.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
# Arguments on first line forbidden when not using vertical alignment.
foo = long_function_name(
var_one, var_two, var_three, var_four, var_five, var_six, var_seven
)

# Further indentation required as indentation is not distinguishable.
def long_function_name(var_one, var_two, var_three, var_four):
print(var_one)


result = some_function_that_takes_arguments("a", "b", "c", "d", "e", "f",)
def some_function_that_takes_arguments(one, two, three, four, five, six):
return one


foo = long_function_name(
"var_one", "var_two", "var_three", "var_four", "var_five", "var_six", "var_seven"
)


result = some_function_that_takes_arguments(
"a",
"b",
"c",
"d",
"e",
"f",
)

my_list = [
1,
Expand Down
38 changes: 25 additions & 13 deletions example.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
# Arguments on first line forbidden when not using vertical alignment.
foo = long_function_name(var_one, var_two, var_three, var_four, var_five, var_six, var_seven)

# Further indentation required as indentation is not distinguishable.
def long_function_name (
var_one, var_two, var_three,
var_four):
def long_function_name(var_one, var_two, var_three, var_four):
print(var_one)


def some_function_that_takes_arguments(one, two, three, four, five, six):
return one


foo = long_function_name(
"var_one", "var_two", "var_three", "var_four", "var_five", "var_six", "var_seven"
)


result = some_function_that_takes_arguments(
'a', 'b', 'c',
'd', 'e', 'f',
)
"a",
"b",
"c",
"d",
"e",
"f",
)

my_list = [
1, 2, 3,
4, 5, 6,
1,
2,
3,
4,
5,
6,
]

x = { 'a':37,'b':42, 'c':927}
x = {"a": 37, "b": 42, "c": 927}
12 changes: 7 additions & 5 deletions playbook.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@

# This comment is indented at the wrong level
- name: DEPLOYING SNMP CONFIGURATIONS ON IOS AND JUNOS BASED ON THE NETWORK OS TYPE FROM A DICTIONARY
---
# This comment is indented at the wrong level
- name: >
DEPLOYING SNMP CONFIGURATIONS ON IOS AND JUNOS
BASED ON THE NETWORK OS TYPE FROM A DICTIONARY
hosts: iosxe,vmx

vars:
ansible_connection: network_cli
vendor_commands :
vendor_commands:
ios: |
snmp-server community ntc-team RO
snmp-server location FL_HQ
snmp-server contact JAMES_CHARLES
ios: |
junos: |
set snmp location FL_HQ
set snmp contact JAMES_CHARLES
set snmp community public authorization read-only
Expand Down
Loading