Skip to content

Commit

Permalink
Pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xfenix committed Oct 22, 2022
1 parent 3398b45 commit c654317
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ lint:
isort -c .
black . --check
lint-in-docker:
docker run -t spellcheck-microservice bash -c "pylint --load-plugins pylint_pydantic whole_app tests && mypy . && vulture whole_app --min-confidence 100"
docker run -t spellcheck-microservice bash -c "pylint --load-plugins pylint_pydantic whole_app tests && mypy . && vulture whole_app --min-confidence 100"
run-prod:
docker run -p 10113:10113 -e SPELLCHECK_WORKERS=1 -t spellcheck-microservice:latest
check-languages:
Expand Down
8 changes: 6 additions & 2 deletions tests/test_dict_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def test_add_to_dict(self, app_client, faker_obj, _patch_various_providers):
"""Add to user dict."""
fake_user_name: typing.Final[str] = faker_obj.user_name()
fake_exc_word: typing.Final[str] = faker_obj.word()
path_to_dict_file: typing.Final[str] = SETTINGS.dictionaries_path.joinpath(fake_user_name)
path_to_dict_file: typing.Final[str] = SETTINGS.dictionaries_path.joinpath( # pylint: disable=no-member
fake_user_name
)
server_response: RequestsResponse = app_client.post(
DICT_ENDPOINT,
json=models.UserDictionaryRequestWithWord(user_name=fake_user_name, exception_word=fake_exc_word).dict(),
Expand All @@ -42,7 +44,9 @@ def test_remove_from_user_dict(self, app_client, faker_obj, _patch_various_provi
"""Delete from user dict."""
fake_exc_word: typing.Final[str] = faker_obj.word()
fake_user_name: typing.Final[str] = faker_obj.user_name()
path_to_dict_file: typing.Final[str] = SETTINGS.dictionaries_path.joinpath(fake_user_name)
path_to_dict_file: typing.Final[str] = SETTINGS.dictionaries_path.joinpath( # pylint: disable=no-member
fake_user_name
)
path_to_dict_file.touch()
path_to_dict_file.write_text(fake_exc_word)
if SETTINGS.dictionaries_storage_provider == StorageProviders.FILE:
Expand Down
2 changes: 1 addition & 1 deletion whole_app/dictionaries/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def init_storage() -> None:
"""Initialize dictionaries storage helper."""
SETTINGS.dictionaries_path.mkdir(parents=True, exist_ok=True)
SETTINGS.dictionaries_path.mkdir(parents=True, exist_ok=True) # pylint: disable=no-member


class FileProvider:
Expand Down

0 comments on commit c654317

Please sign in to comment.