Skip to content

Commit c4c1ec0

Browse files
committed
chore: yamlfix and pre-commit changes
1 parent 597abae commit c4c1ec0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1935
-1812
lines changed

.codacy.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ engines:
44
enabled: true
55
config:
66
languages:
7-
- python
7+
- "python"
88
bandit:
99
enabled: true
1010
fixme:
@@ -14,12 +14,12 @@ engines:
1414
coverage:
1515
enabled: true
1616
excluded_paths:
17-
- tests/**
17+
- "tests/**"
1818
exclude_paths:
1919
- ".flake8"
20-
- "**.md"
21-
- "**.rst"
22-
- "**.pdf"
23-
- "**.jpg"
24-
- "**.png"
25-
- "**.gif"
20+
- '**.md'
21+
- '**.rst'
22+
- '**.pdf'
23+
- '**.jpg'
24+
- '**.png'
25+
- '**.gif'
Lines changed: 148 additions & 166 deletions
Original file line numberDiff line numberDiff line change
@@ -1,171 +1,153 @@
11
---
22
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository
3-
name: CiscoConfParse Bug Report
4-
description: File a bug report
5-
title: "[Bug]: "
6-
labels: ["bug"]
3+
name: "CiscoConfParse Bug Report"
4+
description: "File a bug report"
5+
title: '[Bug]: '
6+
labels:
7+
- "bug"
78
assignees:
8-
- octocat
9-
9+
- "octocat"
1010
body:
11-
- type: markdown
12-
attributes:
13-
value: |
14-
Please use this form to report a CiscoConfParse bug.
15-
16-
- Follow our guidance on <a href="https://meta.stackoverflow.com/q/260648/667301">How to Ask Good Questions</a>.
17-
- Please include sufficient details and context.
18-
- Describe the expected behavior that should have happened but didn't.
19-
- If you find multiple bugs, please submit them in separate issues.
20-
- CiscoConfParse is maintained by volunteers. Please be courteous and patient.
21-
22-
*Issues that do not include all the information requested in this form are subject to closure*.
23-
24-
- type: input
25-
id: contact
26-
attributes:
27-
label: Contact Details
28-
description: How can we get in touch with you if we need more info?
29-
placeholder: [email protected]
30-
validations:
31-
required: false
32-
33-
- type: textarea
34-
id: what-happened
35-
attributes:
36-
label: What happened?
37-
description: What did you see? What did you expect?
38-
placeholder: What did you see? What did you expect?
39-
validations:
40-
required: true
41-
42-
- type: input
43-
id: ciscoconfparse-version
44-
attributes:
45-
label: CiscoConfParse Version
46-
description: What ciscoconfparse2 version had the problem?
47-
placeholder: Version x.y.z (e.g. Version 1.6.13)
48-
validations:
49-
required: true
50-
51-
- type: dropdown
52-
id: operating-system
53-
attributes:
54-
label: What Operating System are you using?
55-
multiple: true
56-
options:
57-
- Microsoft Windows
58-
- MacOS
59-
- Linux - Debian, Ubuntu, CentOS, RHEL or others
60-
- OpenBSD, FreeBSD, NetBSD
61-
- Other (please specify)
62-
validations:
63-
required: true
64-
65-
- type: dropdown
66-
id: python-version
67-
attributes:
68-
label: What Python version(s) have this problem?
69-
multiple: true
70-
options:
71-
- Python 3.13
72-
- Python 3.12
73-
- Python 3.11
74-
- Python 3.10
75-
- Python 3.9
76-
- Python 3.8
77-
- Python 3.7
78-
- Python 3.6
79-
- Python 3.5
80-
- Python 3.x
81-
- Python 2.7
82-
- Python 2.x
83-
- Other (please specify)
84-
validations:
85-
required: true
86-
87-
- type: textarea
88-
id: reproduce-example
89-
validations:
90-
required: true
91-
attributes:
92-
label: Show us how to reproduce the problem. Please tell us if the problem is specific to certain inputs or situations.
93-
description: Include a minimal reproducible example that demonstrates the bug
94-
render: python
95-
placeholder: |
96-
import sys
97-
from ciscoconfparse2 import CiscoConfParse
98-
99-
def parse_a_config():
100-
config = """
101-
hostname Router01
102-
!
103-
interface FastEthernet 0/4
104-
switchport
105-
switchport mode access
106-
!
107-
! Add any other relevant configuration...
108-
!
109-
"""
110-
parse = CiscoConfParse(config.splitlines(), syntax='ios')
111-
return parse
112-
113-
parser = parse_a_config()
114-
115-
116-
- type: textarea
117-
id: python-tracebacks
118-
attributes:
119-
label: Python tracebacks
120-
description: Please include all tracebacks. If no traceback, please say so in the textarea box.
121-
placeholder: |
122-
Traceback (most recent call last):
123-
File "/home/mpenning/fixme/ciscoconfparse2/ciscoconfparse2/ccp_util.py", line 445, in _get_ipv4
124-
IPv4Network(val, strict=False)
125-
File "/opt/python37/lib/python3.7/ipaddress.py", line 1528, in __init__
126-
addr = self._ip_int_from_string(args[0])
127-
File "/opt/python37/lib/python3.7/ipaddress.py", line 1140, in _ip_int_from_string
128-
raise AddressValueError("%s in %r" % (exc, ip_str)) from None
129-
ipaddress.AddressValueError: Only decimal digits permitted in '::ffff:192' in '::ffff:192.0.2.101'
130-
131-
During handling of the above exception, another exception occurred:
132-
133-
Traceback (most recent call last):
134-
File "/home/mpenning/fixme/ciscoconfparse2/ciscoconfparse2/ccp_util.py", line 528, in ip_factory
135-
obj = _get_ipv4(val=val, stdlib=stdlib, debug=debug)
136-
File "/home/mpenning/fixme/ciscoconfparse2/ciscoconfparse2/ccp_util.py", line 460, in _get_ipv4
137-
raise ipaddress.AddressValueError(str(ee))
138-
ipaddress.AddressValueError: Only decimal digits permitted in '::ffff:192' in '::ffff:192.0.2.101'
139-
140-
During handling of the above exception, another exception occurred:
141-
142-
Traceback (most recent call last):
143-
File "<stdin>", line 1, in <module>
144-
File "/home/mpenning/fixme/ciscoconfparse2/ciscoconfparse2/ccp_util.py", line 532, in ip_factory
145-
raise ipaddress.AddressValueError(error_str)
146-
ipaddress.AddressValueError: Cannot parse '::ffff:192.0.2.101' as ipv4
147-
render: shell
148-
validations:
149-
required: true
150-
151-
- type: textarea
152-
id: logs
153-
attributes:
154-
label: Relevant log output
155-
description: Please copy and paste any relevant log output.
156-
placeholder: |
157-
# In /var/log/messages...
158-
2022-02-19T14:41:16.492894-06:00 mySweetBread_Daemon.py started listening on 192.0.2.21 port tcp/9190
159-
2022-02-19T14:43:44.690444-06:00 mySweetBread_Daemon.py went boom!
160-
render: shell
161-
validations:
162-
required: false
163-
164-
- type: checkboxes
165-
id: terms
166-
attributes:
167-
label: Code of Conduct
168-
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/mpenning/ciscoconfparse2/blob/main/CONTRIBUTING.md) as found in [`CONTRIBUTING.md`](https://github.com/mpenning/ciscoconfparse2/blob/main/CONTRIBUTING.md)
169-
options:
170-
- label: I agree to follow this project's [Code of Conduct](https://github.com/mpenning/ciscoconfparse2/blob/main/CONTRIBUTING.md)
11+
- type: "markdown"
12+
attributes:
13+
value: |
14+
Please use this form to report a CiscoConfParse bug.
15+
- Follow our guidance on <a href="https://meta.stackoverflow.com/q/260648/667301">How to Ask Good Questions</a>.
16+
- Please include sufficient details and context.
17+
- Describe the expected behavior that should have happened but didn't.
18+
- If you find multiple bugs, please submit them in separate issues.
19+
- CiscoConfParse is maintained by volunteers. Please be courteous and patient.
20+
*Issues that do not include all the information requested in this form are subject to closure*.
21+
- type: "input"
22+
id: "contact"
23+
attributes:
24+
label: "Contact Details"
25+
description: "How can we get in touch with you if we need more info?"
26+
placeholder: "[email protected]"
27+
validations:
28+
required: false
29+
- type: "textarea"
30+
id: "what-happened"
31+
attributes:
32+
label: "What happened?"
33+
description: "What did you see? What did you expect?"
34+
placeholder: "What did you see? What did you expect?"
35+
validations:
17136
required: true
37+
- type: "input"
38+
id: "ciscoconfparse-version"
39+
attributes:
40+
label: "CiscoConfParse Version"
41+
description: "What ciscoconfparse2 version had the problem?"
42+
placeholder: "Version x.y.z (e.g. Version 1.6.13)"
43+
validations:
44+
required: true
45+
- type: "dropdown"
46+
id: "operating-system"
47+
attributes:
48+
label: "What Operating System are you using?"
49+
multiple: true
50+
options:
51+
- "Microsoft Windows"
52+
- "MacOS"
53+
- "Linux - Debian, Ubuntu, CentOS, RHEL or others"
54+
- "OpenBSD, FreeBSD, NetBSD"
55+
- "Other (please specify)"
56+
validations:
57+
required: true
58+
- type: "dropdown"
59+
id: "python-version"
60+
attributes:
61+
label: "What Python version(s) have this problem?"
62+
multiple: true
63+
options:
64+
- "Python 3.13"
65+
- "Python 3.12"
66+
- "Python 3.11"
67+
- "Python 3.10"
68+
- "Python 3.9"
69+
- "Python 3.8"
70+
- "Python 3.7"
71+
- "Python 3.6"
72+
- "Python 3.5"
73+
- "Python 3.x"
74+
- "Python 2.7"
75+
- "Python 2.x"
76+
- "Other (please specify)"
77+
validations:
78+
required: true
79+
- type: "textarea"
80+
id: "reproduce-example"
81+
validations:
82+
required: true
83+
attributes:
84+
label: "Show us how to reproduce the problem. Please tell us if the problem is specific to certain inputs or situations."
85+
description: "Include a minimal reproducible example that demonstrates the bug"
86+
render: "python"
87+
placeholder: |
88+
import sys
89+
from ciscoconfparse2 import CiscoConfParse
90+
def parse_a_config():
91+
config = """
92+
hostname Router01
93+
!
94+
interface FastEthernet 0/4
95+
switchport
96+
switchport mode access
97+
!
98+
! Add any other relevant configuration...
99+
!
100+
"""
101+
parse = CiscoConfParse(config.splitlines(), syntax='ios')
102+
return parse
103+
parser = parse_a_config()
104+
- type: "textarea"
105+
id: "python-tracebacks"
106+
attributes:
107+
label: "Python tracebacks"
108+
description: "Please include all tracebacks. If no traceback, please say so in the textarea box."
109+
placeholder: |
110+
Traceback (most recent call last):
111+
File "/home/mpenning/fixme/ciscoconfparse2/ciscoconfparse2/ccp_util.py", line 445, in _get_ipv4
112+
IPv4Network(val, strict=False)
113+
File "/opt/python37/lib/python3.7/ipaddress.py", line 1528, in __init__
114+
addr = self._ip_int_from_string(args[0])
115+
File "/opt/python37/lib/python3.7/ipaddress.py", line 1140, in _ip_int_from_string
116+
raise AddressValueError("%s in %r" % (exc, ip_str)) from None
117+
ipaddress.AddressValueError: Only decimal digits permitted in '::ffff:192' in '::ffff:192.0.2.101'
118+
During handling of the above exception, another exception occurred:
119+
Traceback (most recent call last):
120+
File "/home/mpenning/fixme/ciscoconfparse2/ciscoconfparse2/ccp_util.py", line 528, in ip_factory
121+
obj = _get_ipv4(val=val, stdlib=stdlib, debug=debug)
122+
File "/home/mpenning/fixme/ciscoconfparse2/ciscoconfparse2/ccp_util.py", line 460, in _get_ipv4
123+
raise ipaddress.AddressValueError(str(ee))
124+
ipaddress.AddressValueError: Only decimal digits permitted in '::ffff:192' in '::ffff:192.0.2.101'
125+
During handling of the above exception, another exception occurred:
126+
Traceback (most recent call last):
127+
File "<stdin>", line 1, in <module>
128+
File "/home/mpenning/fixme/ciscoconfparse2/ciscoconfparse2/ccp_util.py", line 532, in ip_factory
129+
raise ipaddress.AddressValueError(error_str)
130+
ipaddress.AddressValueError: Cannot parse '::ffff:192.0.2.101' as ipv4
131+
render: "shell"
132+
validations:
133+
required: true
134+
- type: "textarea"
135+
id: "logs"
136+
attributes:
137+
label: "Relevant log output"
138+
description: "Please copy and paste any relevant log output."
139+
placeholder: |
140+
# In /var/log/messages...
141+
2022-02-19T14:41:16.492894-06:00 mySweetBread_Daemon.py started listening on 192.0.2.21 port tcp/9190
142+
2022-02-19T14:43:44.690444-06:00 mySweetBread_Daemon.py went boom!
143+
render: "shell"
144+
validations:
145+
required: false
146+
- type: "checkboxes"
147+
id: "terms"
148+
attributes:
149+
label: "Code of Conduct"
150+
description: "By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/mpenning/ciscoconfparse2/blob/main/CONTRIBUTING.md) as found in [`CONTRIBUTING.md`](https://github.com/mpenning/ciscoconfparse2/blob/main/CONTRIBUTING.md)"
151+
options:
152+
- label: "I agree to follow this project's [Code of Conduct](https://github.com/mpenning/ciscoconfparse2/blob/main/CONTRIBUTING.md)"
153+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
blank_issues_enabled: false
1111
contact_links:
1212
- name: "Security issue"
13-
13+
1414
about: "Do not report security issues publicly. Please email our security contact."
15-
- name: Questions
16-
url: https://stackoverflow.com/questions/ask?title=How%20do%20I&tags=ciscoconfparse+python
15+
- name: "Questions"
16+
url: "https://stackoverflow.com/questions/ask?title=How%20do%20I&tags=ciscoconfparse+python"
1717
about: "StackOverflow or reddit/r/Python are good places to ask programming questions, such as those involving CiscoConfParse(). We do not support python programming questions here."

0 commit comments

Comments
 (0)