Skip to content

Commit 4c59a0f

Browse files
committed
bump pytest/black, appease pylint, add 3.10 to ci
1 parent fb12ef1 commit 4c59a0f

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

.github/workflows/commit.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
strategy:
99
max-parallel: 12
1010
matrix:
11-
os: [ubuntu-latest, macos-latest, windows-latest]
12-
python-version: [3.6, 3.7, 3.8, 3.9-dev]
11+
os: [ubuntu-latest, macos-latest]
12+
python-version: [3.6, 3.7, 3.8, 3.9, 3.10.0-rc.1]
1313
steps:
1414
- uses: actions/checkout@v2
1515
- name: set up python ${{ matrix.python-version }}

.github/workflows/weekly.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
build:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
12-
max-parallel: 9
12+
max-parallel: 12
1313
matrix:
14-
os: [ubuntu-latest, macos-latest, windows-latest]
15-
python-version: [3.6, 3.7, 3.8]
14+
os: [ubuntu-latest, macos-latest]
15+
python-version: [3.6, 3.7, 3.8, 3.9, 3.10.0-rc.1]
1616
steps:
1717
- uses: actions/checkout@v1
1818
- name: set up python ${{ matrix.python-version }}

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
CHANGELOG
22
=======
33

4+
# 2022.01.30 (in development)
5+
- Added python3.10 to ci
6+
7+
48
# 2021.07.30
59
- Added support for hosts in inventory that only have an IP address and no "ansible_host" field -- see #47
610

nornir_ansible/plugins/inventory/ansible.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def read_vars_file(
252252
vars_dir = Path(path) / sub_dir
253253

254254
if is_dir:
255-
with open(path) as f:
255+
with open(path, "r", encoding="utf-8") as f:
256256
for ext in VARS_FILENAME_EXTENSIONS:
257257
if Path(f"{path}{ext}").is_file():
258258
LOG.debug("AnsibleInventory: reading var file %r", path)
@@ -263,7 +263,7 @@ def read_vars_file(
263263
for extension in VARS_FILENAME_EXTENSIONS:
264264
vars_file = vars_file_base.with_suffix(vars_file_base.suffix + extension)
265265
if vars_file.is_file():
266-
with open(vars_file) as f:
266+
with open(vars_file, "r", encoding="utf-8") as f:
267267
LOG.debug("AnsibleInventory: reading var file %r", vars_file)
268268
return cast(Dict[str, Any], YAML.load(f))
269269
LOG.debug(
@@ -406,7 +406,7 @@ def load_hosts_file(self) -> None:
406406
class YAMLParser(AnsibleParser):
407407
def load_hosts_file(self) -> None:
408408
"""Parse host specific inventory files"""
409-
with open(self.hostsfile, "r") as f:
409+
with open(self.hostsfile, "r", encoding="utf-8") as f:
410410
self.original_data = cast(AnsibleGroupsDict, YAML.load(f))
411411

412412

requirements-dev.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
tox==3.24.3
2-
black==21.7b0
2+
black==21.8b0
33
isort==5.9.3
44
mypy==0.910
5-
pytest==6.2.4
5+
pytest==6.2.5
66
pytest-cov==2.12.1
77
pylama==7.7.1
88
pycodestyle==2.7.0

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
__author__ = "Carl Montanari"
66

7-
with open("README.md", "r") as f:
7+
with open("README.md", "r", encoding="utf-8") as f:
88
README = f.read()
99

1010
setuptools.setup(

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py36,py37,py38,py39
2+
envlist = py36,py37,py38,py39,py310
33

44
[testenv]
55
deps = -rrequirements-dev.txt

0 commit comments

Comments
 (0)