Skip to content

Commit f307248

Browse files
authored
Merge pull request #117 from telekom-mms/multiple-fixes
Multiple fixes
2 parents 7943572 + 33ca782 commit f307248

7 files changed

Lines changed: 330 additions & 373 deletions

File tree

.github/version-drafter.yml

Whitespace-only changes.

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
strategy:
1313
matrix:
1414
python:
15-
- "3.8"
1615
- "3.9"
1716
- "3.10"
1817
- "3.11"
18+
- "3.12"
1919
steps:
2020
- name: Check out code
2121
uses: actions/checkout@v4

fortilib/addressgroup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ def __init__(self):
1919
def populate(self, object_data: dict):
2020
super().populate(object_data)
2121

22+
def __eq__(self, other):
23+
if isinstance(other, FortigateAddressGroup):
24+
return self.name == other.name and self.member == other.member
25+
26+
return False
27+
2228
def render(self) -> dict:
2329
"""Generate dict with all object arguments for fortigate api call.
2430

fortilib/firewall.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ def get_interfaces(self) -> List[FortigateInterface]:
232232
"""Query Fortigate API for interfaces
233233
:class:`fortilib.interface.FortigateInterface` and create list.
234234
"""
235-
interfaces: List[FortigateInterface] = [FortigateInterface.from_dict({"name": "any"})]
235+
interfaces: List[FortigateInterface] = [
236+
FortigateInterface.from_dict({"name": "any"})
237+
]
236238
for raw in self.fortigate.get_firewall_interface():
237239
interface = FortigateInterface.from_dict(raw)
238240
interfaces.append(interface)

poetry.lock

Lines changed: 316 additions & 366 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ keywords = ["firewall", "fortinet", "fortigate"]
2020
Changelog = "https://github.com/telekom-mms/fortilib/blob/master/CHANGELOG.md"
2121

2222
[tool.poetry.dependencies]
23-
python = ">=3.8,<4.0"
23+
python = ">=3.9,<4.0"
2424
httpx = ">=0.23.0"
2525

2626
[tool.poetry.dev-dependencies]
@@ -32,9 +32,8 @@ coverage = ">=6.4.2"
3232
pytest-integration = ">=0.2.2"
3333
pytest-cov = ">=4.0.0"
3434
pytest-order = ">=1.0.1"
35-
Sphinx = ">=5.1.1"
36-
flake8 = ">=5.0.4"
37-
flake8-gl-codeclimate = ">=0.1.6"
35+
Sphinx = "^7.4.7"
36+
flake8 = "^7.0.0"
3837
sphinx-rtd-theme = ">=1.0.0"
3938

4039
[build-system]

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ commands =
1313
[testenv:linter]
1414
commands =
1515
poetry install -v
16-
flake8 --format gl-codeclimate --output-file gl-code-quality-report.json
16+
flake8
1717

1818
[testenv:formatter]
1919
commands =

0 commit comments

Comments
 (0)