Skip to content

Commit

Permalink
Apply black
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Aug 4, 2024
1 parent 5ba502c commit 0767743
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion argcomplete/scripts/activate_global_python_argcomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ def main():
destinations.append(args.dest)
elif site.ENABLE_USER_SITE and site.USER_SITE and site.USER_SITE in argcomplete.__file__:
print(
"Argcomplete was installed in the user site local directory. Defaulting to user installation.", file=sys.stderr
"Argcomplete was installed in the user site local directory. Defaulting to user installation.",
file=sys.stderr,
)
link_user_rcfiles()
elif sys.prefix != sys.base_prefix:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# PEP 366
__package__ = "argcomplete.scripts"


def main():
if len(sys.argv) != 2:
sys.exit(__doc__)
Expand All @@ -37,7 +38,9 @@ def main():
re_match = re.match("# EASY-INSTALL-SCRIPT: '(.+)','(.+)'", line)
assert re_match is not None
dist, script = re_match.groups()
if "PYTHON_ARGCOMPLETE_OK" in pkg_resources.get_distribution(dist).get_metadata("scripts/" + script):
if "PYTHON_ARGCOMPLETE_OK" in pkg_resources.get_distribution(dist).get_metadata(
"scripts/" + script
):
return 0
elif line.startswith("# EASY-INSTALL-ENTRY-SCRIPT"):
re_match = re.match("# EASY-INSTALL-ENTRY-SCRIPT: '(.+)','(.+)','(.+)'", line)
Expand Down
2 changes: 1 addition & 1 deletion argcomplete/scripts/register_python_argcomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
# PEP 366
__package__ = "argcomplete.scripts"


def main():
parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)

Expand Down Expand Up @@ -67,7 +68,6 @@ def main():

args = parser.parse_args()


sys.stdout.write(
argcomplete.shellcode(
args.executable, args.use_defaults, args.shell, args.complete_arguments, args.external_argcomplete_script
Expand Down

0 comments on commit 0767743

Please sign in to comment.