Skip to content

Commit

Permalink
Removed unused import and improved docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
facundobatista committed Feb 18, 2021
1 parent 6401d55 commit aad9797
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions charmcraft/commands/store/__init__.py
Expand Up @@ -19,7 +19,6 @@
import ast
import hashlib
import logging
import os
import pathlib
import string
import textwrap
Expand Down Expand Up @@ -287,9 +286,9 @@ class UploadCommand(BaseCommand):
overview = textwrap.dedent("""
Upload a charm or bundle to Charmhub.
Push a charm or bundle to Charmhub where it will be verified for
conformance to the packaging standard. This command will finish
successfully once the package is approved by Charmhub.
Push a charm or bundle to Charmhub where it will be verified.
This command will finish successfully once the package is
approved by Charmhub.
In the event of a failure in the verification process, charmcraft
will report details of the failure, otherwise it will give you the
Expand Down
5 changes: 2 additions & 3 deletions charmcraft/utils.py
Expand Up @@ -70,10 +70,9 @@ def get_templates_environment(templates_dir):


def useful_filepath(filepath):
"""Convert the string to Path and verify that is a useful file path.
"""Return a valid Path with user name expansion for filepath.
It checks that the file exists and it's readable, and that it's actually a
file. Also the `~` is expanded to the user's home.
CommandError is raised if filepath is not a valid file or is not readable.
"""
filepath = pathlib.Path(filepath).expanduser()
if not os.access(str(filepath), os.R_OK): # access doesn't support pathlib in 3.5
Expand Down

0 comments on commit aad9797

Please sign in to comment.