diff --git a/.github/workflows/preflight_check.yaml b/.github/workflows/preflight_check.yaml index f1643f9..5cf7b87 100644 --- a/.github/workflows/preflight_check.yaml +++ b/.github/workflows/preflight_check.yaml @@ -10,14 +10,14 @@ on: jobs: lint: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: - python-version: [3.6, 3.7, 3.8] + python-version: ["3.8", "3.9", "3.10"] 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 @@ -34,14 +34,14 @@ jobs: - name: Lint with flake8 run: flake8 --exclude test,docs,examples . test: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + python-version: ["3.7", "3.8", "3.9", "3.10"] 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 @@ -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/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/requirements-dev.txt b/requirements-dev.txt index 56c9a07..d63813a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -black==24.3.0 +black==22.8.0 defusedxml==0.6.0 isort==5.6.4 pre-commit diff --git a/setup.py b/setup.py index a2ca71f..eb5c0f5 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- -from distutils.core import setup import sys +from distutils.core import setup -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()