From 8dc29d38c38e7dbb69ec497c10013afc061f05e1 Mon Sep 17 00:00:00 2001 From: Ronald Bister Date: Sun, 19 Jan 2025 22:22:25 +0100 Subject: [PATCH 1/6] fix: added versions for python envs --- .github/workflows/preflight_check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/preflight_check.yaml b/.github/workflows/preflight_check.yaml index f1643f9..284998e 100644 --- a/.github/workflows/preflight_check.yaml +++ b/.github/workflows/preflight_check.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8] + python-version: [3.6.15, 3.7.17, 3.8.18] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + python-version: [3.5.10, 3.6.15, 3.7.17, 3.8.18] steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} From 3048cfb88728120a06b5d98740a45ef4725a7a8f Mon Sep 17 00:00:00 2001 From: Ronald Bister Date: Sun, 19 Jan 2025 22:33:12 +0100 Subject: [PATCH 2/6] fix: updated lib version for checks --- .github/workflows/preflight_check.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/preflight_check.yaml b/.github/workflows/preflight_check.yaml index 284998e..1487df0 100644 --- a/.github/workflows/preflight_check.yaml +++ b/.github/workflows/preflight_check.yaml @@ -15,9 +15,9 @@ jobs: matrix: python-version: [3.6.15, 3.7.17, 3.8.18] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -39,9 +39,9 @@ jobs: matrix: python-version: [3.5.10, 3.6.15, 3.7.17, 3.8.18] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Setup Environment From 28072ca14f194e7361649192ebeb0a5d4ef23c40 Mon Sep 17 00:00:00 2001 From: Ronald Bister Date: Sun, 19 Jan 2025 22:53:19 +0100 Subject: [PATCH 3/6] fix: fixed pyblack codefmt --- .github/workflows/preflight_check.yaml | 2 +- libnmap/objects/os.py | 1 - libnmap/process.py | 2 -- setup.py | 4 ++-- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/preflight_check.yaml b/.github/workflows/preflight_check.yaml index 1487df0..a7f9314 100644 --- a/.github/workflows/preflight_check.yaml +++ b/.github/workflows/preflight_check.yaml @@ -28,7 +28,7 @@ jobs: uses: psf/black@stable with: options: "--check -l 79 --exclude docs/" - version: "22.8.0" + version: "24.10.0" - name: Format checker with isort run: isort --check-only -m 3 -l 79 --profile=black . - name: Lint with flake8 diff --git a/libnmap/objects/os.py b/libnmap/objects/os.py index 30d3f3b..2d2e109 100644 --- a/libnmap/objects/os.py +++ b/libnmap/objects/os.py @@ -89,7 +89,6 @@ def __init__(self, osmatch_dict): pass def add_osclass(self, osclass_obj): - """ Add a NmapOSClass object to the OSMatch object. This method is useful to implement compatibility with older versions of NMAP diff --git a/libnmap/process.py b/libnmap/process.py index d53854f..a2825cc 100644 --- a/libnmap/process.py +++ b/libnmap/process.py @@ -20,7 +20,6 @@ class NmapTask(object): - """ NmapTask is a internal class used by process. Each time nmap starts a new task during the scan, a new class will be instantiated. @@ -46,7 +45,6 @@ def __init__(self, name, starttime=0, extrainfo=""): class NmapProcess(Thread): - """ NmapProcess is a class which wraps around the nmap executable. diff --git a/setup.py b/setup.py index a2ca71f..5fa816c 100644 --- a/setup.py +++ b/setup.py @@ -2,10 +2,10 @@ from distutils.core import setup import sys -if sys.version_info >= (3,0): +if sys.version_info >= (3, 0): with open("README.rst", encoding="utf-8") as rfile: long_description = rfile.read() -else: # encoding not compatible with python2 +else: # encoding not compatible with python2 with open("README.rst") as rfile: long_description = rfile.read() From 1d39053650355c1564079793ff6f80ef184f2ed2 Mon Sep 17 00:00:00 2001 From: Ronald Bister Date: Sun, 19 Jan 2025 22:54:28 +0100 Subject: [PATCH 4/6] fix: isort in setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5fa816c..eb5c0f5 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from distutils.core import setup import sys +from distutils.core import setup if sys.version_info >= (3, 0): with open("README.rst", encoding="utf-8") as rfile: From 5c15ec31b7a18ef2b81bb2ad82b9356f9abc888c Mon Sep 17 00:00:00 2001 From: Ronald Bister Date: Sun, 19 Jan 2025 22:59:12 +0100 Subject: [PATCH 5/6] fix: requirements file --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 56c9a07..cb81983 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -black==24.3.0 +black==24.10.0 defusedxml==0.6.0 isort==5.6.4 pre-commit From 1f649c4932fc15687cd983b80aaf398f36c578b0 Mon Sep 17 00:00:00 2001 From: Ronald Bister Date: Sun, 19 Jan 2025 23:53:01 +0100 Subject: [PATCH 6/6] fix: gh actions fix bllint issue --- .github/workflows/preflight_check.yaml | 12 ++++++------ requirements-dev.txt | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/preflight_check.yaml b/.github/workflows/preflight_check.yaml index a7f9314..5cf7b87 100644 --- a/.github/workflows/preflight_check.yaml +++ b/.github/workflows/preflight_check.yaml @@ -10,10 +10,10 @@ on: jobs: lint: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: - python-version: [3.6.15, 3.7.17, 3.8.18] + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -28,16 +28,16 @@ jobs: uses: psf/black@stable with: options: "--check -l 79 --exclude docs/" - version: "24.10.0" + version: "22.8.0" - name: Format checker with isort run: isort --check-only -m 3 -l 79 --profile=black . - name: Lint with flake8 run: flake8 --exclude test,docs,examples . test: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: - python-version: [3.5.10, 3.6.15, 3.7.17, 3.8.18] + python-version: ["3.7", "3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v4 - name: Setup Python ${{ matrix.python-version }} @@ -65,7 +65,7 @@ jobs: coveralls: name: Finish Coveralls needs: test - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 container: python:3-slim steps: - name: Finished diff --git a/requirements-dev.txt b/requirements-dev.txt index cb81983..d63813a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -black==24.10.0 +black==22.8.0 defusedxml==0.6.0 isort==5.6.4 pre-commit