Skip to content

Commit

Permalink
Spelling and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Havrila authored and GeorgePantelakis committed Nov 9, 2023
1 parent cf3ea50 commit 021c0e6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion SCAutolib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True,
"""
if return_code is None:
return_code = [0]
if type(cmd) == str:
if isinstance(cmd, str):
cmd = cmd.split(" ")
logger.debug(f"run: {' '.join([str(i) for i in cmd])}")
out = subprocess.run(cmd, stdout=stdout, stderr=stderr, encoding="utf-8",
Expand Down
2 changes: 1 addition & 1 deletion SCAutolib/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def setup_system(self, install_missing: bool, gdm: bool, graphical: bool):

if graphical:
run(['dnf', 'groupinstall', 'Server with GUI', '-y'])
# disable subsription message
# disable subscription message
run(['systemctl', '--global', 'mask',
'org.gnome.SettingsDaemon.Subscription.target'])
# disable welcome message
Expand Down
2 changes: 1 addition & 1 deletion SCAutolib/models/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def load(json_file, **kwars):

card = None
if cnt["type"] == "virtual":
assert "user" in kwars.keys(),\
assert "user" in kwars.keys(), \
"No user is provided to load the card."
card = VirtualCard(user=kwars["user"],
softhsm2_conf=Path(cnt["softhsm"]))
Expand Down
2 changes: 1 addition & 1 deletion SCAutolib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def user_factory(username, **kwargs):
user = None
if user_file.exists():
result = BaseUser.load(user_file, **kwargs)
if type(result) == tuple:
if isinstance(result, tuple):
user, card_file = result
logger.debug(f"Loading card from {card_file}")
user.card = Card.load(card_file, user=user)
Expand Down
2 changes: 1 addition & 1 deletion test/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_create_fail(file_test_prepare):
file_test = file_test_prepare
with file_test._conf_file.open('w') as config:
config.write('Test config file')
with pytest.raises(FileExistsError, match=f'{file_test._conf_file } '
with pytest.raises(FileExistsError, match=f'{file_test._conf_file} '
f'already exists'):
file_test.create()

Expand Down

0 comments on commit 021c0e6

Please sign in to comment.