Skip to content

Commit

Permalink
yapf format
Browse files Browse the repository at this point in the history
  • Loading branch information
Spitfire1900 committed Mar 23, 2024
1 parent cb2457c commit a2b0b38
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,11 @@ select = [
"TCH", # flake8-type-checking
"RUF", # ruff specific rules
]

[tool.yapf]
based_on_style = "pep8"
column_limit = "120"
coalesce_brackets = "True"
each_dict_entry_on_separate_line = "False"
dedent_closing_brackets = "False"
split_before_named_assigns = "False"
3 changes: 2 additions & 1 deletion xontrib_pygitstatus/event_hooks.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
def activate_env(path:str):
def activate_env(path: str):
# lazy import to reduce startup cost
from xontrib.voxapi import Vox

vox = Vox()
vox.activate(path)


def listen_cd(olddir, newdir, **_):
activate_env(newdir)
3 changes: 0 additions & 3 deletions xontrib_pygitstatus/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@ def _load_xontrib_(xsh: XonshSession, **_):

print("Autoloading xontrib: xontrib-pygitstatus")


from .event_hooks import listen_cd
xsh.builtins.events.on_chdir(listen_cd)


0 comments on commit a2b0b38

Please sign in to comment.