Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dalf committed May 7, 2022
1 parent 2ec621f commit 31ea401
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 18 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: searx-instances

on: [push, pull_request]
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))

install:
python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel setuptools
pip install -r requirements.txt

install-update:
Expand Down
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest]
asyncio_mode = strict
10 changes: 5 additions & 5 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pylint==2.8.3
pytest==6.2.4
pytest-asyncio==0.15.1
pytest-cov==2.12.1
flake8==3.9.2
pylint==2.13.8
pytest==7.1.2
pytest-asyncio==0.18.3
pytest-cov==3.0.0
flake8==4.0.1
4 changes: 2 additions & 2 deletions requirements-update.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
httpx==0.18.1
GitPython==3.1.17
httpx==0.22.0
GitPython==3.1.27
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pyyaml==5.4.1
rfc3986==1.5.0
pyyaml==6.0
rfc3986==2.0.0
2 changes: 1 addition & 1 deletion searxinstances/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__title__ = "searxinstances"
__description__ = "SearXNG & searx instances."
__version__ = "0.0.2"
__version__ = "0.0.3"
5 changes: 3 additions & 2 deletions searxinstances/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ def run_instance_diff(content_after: str):
with tempfile.NamedTemporaryFile(delete=False) as tmpfile:
tmpfile.write(content_after)
tmpfile.flush()
subprocess.Popen(['diff', tmpfile.name, model.FILENAME])
with subprocess.Popen(['diff', tmpfile.name, model.FILENAME]):
pass


def check():
print(f'Checking {model.FILENAME}')
with open(model.FILENAME, 'r') as input_file:
with open(model.FILENAME, 'r', encoding='utf-8') as input_file:
content = input_file.read()
instance_list = model.yaml_load(content)
content_after = model.yaml_dump(instance_list)
Expand Down
4 changes: 2 additions & 2 deletions searxinstances/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,15 @@ def yaml_load(content: str) -> InstanceList:


def load(filename: str = FILENAME) -> InstanceList:
with open(filename, 'r') as input_file:
with open(filename, 'r', encoding='utf-8') as input_file:
instance_list = yaml.load(input_file, Loader=ILLoader)
assert isinstance(instance_list, InstanceList)
return instance_list


def save(instance_list: InstanceList, filename: str = FILENAME):
output_content = yaml_dump(instance_list)
with open(filename, 'w') as output_file:
with open(filename, 'w', encoding='utf-8') as output_file:
output_file.write(output_content)


Expand Down
4 changes: 2 additions & 2 deletions searxinstances/utils/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def get_editor_args(editor):
def get_default_editors():
sys_platform = sys.platform

for platform in EDITORS:
for platform, editor in EDITORS.items():
if sys_platform.startswith(platform):
return EDITORS[platform]
return editor

return COMMON_EDITORS

Expand Down

0 comments on commit 31ea401

Please sign in to comment.