Compare commits

..

No commits in common. "master" and "0.1" have entirely different histories.
master ... 0.1

5 changed files with 17 additions and 17 deletions

View File

@ -11,17 +11,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false
matrix: matrix:
python-version: [3.8, 3.9, '3.10', '3.11'] python-version: [3.7, 3.8, 3.9]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip

View File

@ -1,4 +1,5 @@
appdirs==1.4.4 appdirs==1.4.4
requests==2.31.0 requests==2.25.1
ruamel.yaml==0.18.5 ruamel.yaml==0.17.4
ruamel.yaml.clib==0.2.8 ruamel.yaml.clib==0.2.2
urllib3==1.26.4

View File

@ -3,26 +3,27 @@ import sys
from ruamel.yaml import YAML, scalarstring from ruamel.yaml import YAML, scalarstring
from blimp.misc import local_file_present from .misc import local_file_present
class ProcessBlocklist: class ProcessBlocklist:
def __init__(self): def __init__(self):
pass pass
@classmethod @classmethod
def process(self, blacklist, outfile, dryrun: bool): def process(self, blacklist, outfile, dryrun: bool):
""" """
function to build and compare the local yaml file to the remote file function to build and compare the local yaml file to the remote file
if the remote file is different, the local file gets overwritten if the remote file is different, the local file gets overwritten
""" """
# cheeky none catch
try: try:
# load local blacklist outfile # load local blacklist outfile
with open(outfile, "r", encoding="utf-8") as local_file: if local_file_present(outfile):
local_blacklist = local_file.read() with open(outfile, "r", encoding="utf-8") as local_file:
local_blacklist = local_file.read()
except (TypeError, FileNotFoundError): except TypeError:
# no local copy use empty one instead # no local copy use empty one instead
local_blacklist = YAML(typ="safe") local_blacklist = YAML(typ="safe")

View File

@ -3,7 +3,7 @@
import argparse import argparse
from blimp.main import Blimp from .main import Blimp
def cli(): def cli():

View File

@ -6,8 +6,8 @@ from pathlib import Path
import requests import requests
from appdirs import user_cache_dir from appdirs import user_cache_dir
from blimp.bl_process import ProcessBlocklist from .bl_process import ProcessBlocklist
from blimp.misc import local_file_present from .misc import local_file_present
class Blimp: class Blimp:
@ -91,5 +91,5 @@ class Blimp:
if __name__ == "__main__": if __name__ == "__main__":
from blimp.cli import cli from .cli import cli
cli() cli()