Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aaltat committed May 18, 2024
1 parent 6a0665e commit 5bb64d1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/SeleniumLibrary/entry/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def cli():
"""
pass


@cli.command()
@click.argument(
"filename",
Expand Down
4 changes: 2 additions & 2 deletions src/SeleniumLibrary/entry/get_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def get_version():
python_version = (
f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
)
#print(f"Used Python is: {sys.executable}\nVersion: {python_version}")
#print(f'Robot Framework version: "{get_rf_version()}"')
# print(f"Used Python is: {sys.executable}\nVersion: {python_version}")
# print(f'Robot Framework version: "{get_rf_version()}"')

return (
f"\nUsed Python is: {sys.executable}\n\tVersion: {python_version}\n"
Expand Down
6 changes: 2 additions & 4 deletions src/SeleniumLibrary/entry/translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
)


def get_library_translaton(
plugings: Optional[str] = None
) -> dict:
def get_library_translaton(plugings: Optional[str] = None) -> dict:
from SeleniumLibrary import SeleniumLibrary

selib = SeleniumLibrary(plugins=plugings)
Expand Down Expand Up @@ -121,4 +119,4 @@ def compare_translatoin(filename: Path, library_translation: dict):

table = _get_heading(max_kw_lenght)
table.extend(table_body)
return table
return table
10 changes: 7 additions & 3 deletions utest/test/entry/test_entry_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
from approvaltests import verify_all

from SeleniumLibrary.entry.get_versions import get_version
from SeleniumLibrary.entry.translation import compare_translatoin, get_library_translaton
from SeleniumLibrary.entry.translation import (
compare_translatoin,
get_library_translaton,
)


def test_version():
Expand All @@ -17,8 +20,8 @@ def test_version():
assert "Used Python is: " in lines[1], lines[1]
assert python_version in lines[2], lines[2]
assert 'Robot Framework version: "' in lines[3], lines[3]
assert 'Installed SeleniumLibrary version is: ' in lines[4], lines[4]
assert 'Installed selenium version is: ' in lines[5], lines[5]
assert "Installed SeleniumLibrary version is: " in lines[4], lines[4]
assert "Installed selenium version is: " in lines[5], lines[5]


def test_get_translation():
Expand All @@ -28,6 +31,7 @@ def test_get_translation():
assert item["doc"], item["doc"]
assert item["sha256"], item["sha256"]


def test_compare_translation(tmp_path: Path):
translation = tmp_path / "translation.json"
data = get_library_translaton()
Expand Down
4 changes: 3 additions & 1 deletion utest/test/translation/test_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def test_translation(sl: SeleniumLibrary):
spec = sl.keywords_spec["__init__"]
assert spec.argument_specification
doc: str = spec.documentation
assert doc.startswith("1 SeleniumLibrary is a web testing library for Robot Framework")
assert doc.startswith(
"1 SeleniumLibrary is a web testing library for Robot Framework"
)

spec = sl.keywords_spec["hallinnoi_hälytys"]
doc: str = spec.documentation
Expand Down

0 comments on commit 5bb64d1

Please sign in to comment.