diff --git a/docs/cli.rst b/docs/cli.rst --- a/docs/cli.rst +++ b/docs/cli.rst @@ -2,5 +2,5 @@ ====================== .. click:: swh.scanner.cli:scan - :prog: swh scanner scan - :show-nested: + :prog: swh scanner scan + :show-nested: diff --git a/swh/scanner/cli.py b/swh/scanner/cli.py --- a/swh/scanner/cli.py +++ b/swh/scanner/cli.py @@ -116,7 +116,7 @@ metavar="PATTERN", multiple=True, help="Exclude directories using glob patterns \ - (e.g., '*.git' to exclude all .git directories)", + (e.g., ``*.git`` to exclude all .git directories)", ) @click.option( "-f", diff --git a/swh/scanner/model.py b/swh/scanner/model.py --- a/swh/scanner/model.py +++ b/swh/scanner/model.py @@ -125,32 +125,30 @@ .. code-block:: none - root { - subdir: { - file.txt + root { + subdir: { + file.txt + } } - } The generated dictionary will be: .. code-block:: none - { - "root": { - "swhid": "...", - "known": True/False - } - "root/subdir": { - "swhid": "...", - "known": True/False - } - "root/subdir/file.txt": { - "swhid": "...", - "known": True/False + { + "root": { + "swhid": "...", + "known": True/False + } + "root/subdir": { + "swhid": "...", + "known": True/False + } + "root/subdir/file.txt": { + "swhid": "...", + "known": True/False + } } - } - - """ return { str(Path(k).relative_to(self.path)): v diff --git a/swh/scanner/scanner.py b/swh/scanner/scanner.py --- a/swh/scanner/scanner.py +++ b/swh/scanner/scanner.py @@ -35,7 +35,9 @@ Returns: A dictionary with: - key: SWHID searched + + key: + SWHID searched value: value['known'] = True if the SWHID is found value['known'] = False if the SWHID is not found