Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/sisl_toolbox/siesta/atom/_register_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from ._atom import atom_plot

# TODO once 3.10 hits, use `sys.orig_argv[0]` which is non-writeable
_script = Path(sys.argv[0]).name


Expand All @@ -19,7 +20,7 @@

title = "Plotting facility for atom output (run in the atom output directory)"
if is_sub:
global _script
_script = f"{_script} atom-plot"

Check notice

Code scanning / CodeQL

Unused global variable Note

The global variable '_script' is not used.
p = subp.add_parser("atom-plot", description=title, help=title, **parser_kwargs)
else:
Expand Down
5 changes: 3 additions & 2 deletions src/sisl_toolbox/siesta/minimizer/_register_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
subp = p.add_subparsers(title="Commands")

get_argparse_parser(
optimize_basis, name="optim", subp=subp, parser_kwargs=parser_kwargs
write_basis_to_yaml, name="build", subp=subp, parser_kwargs=parser_kwargs
)
parser_kwargs["aliases"] = ("optim",)

Check failure

Code scanning / CodeQL

Modification of parameter with default Error

This expression mutates a
default value
.
get_argparse_parser(
write_basis_to_yaml, name="build", subp=subp, parser_kwargs=parser_kwargs
optimize_basis, name="optimize", subp=subp, parser_kwargs=parser_kwargs
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to update the documentation too then, at docs/toolbox/basis/basis.rst

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or is optim also valid?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both are valid, but yes, I should have done that (will do!)

)


Expand Down
Loading