From a972cc65973da94732b4658958b8a1cc8f8dcb24 Mon Sep 17 00:00:00 2001 From: Bryan Bugyi Date: Mon, 11 Mar 2024 21:28:23 -0400 Subject: [PATCH] Remove column number arg from 'action open' --- CHANGELOG.md | 5 ++++- README.md | 12 +++++------- src/zorg/config.py | 9 --------- tests/test_action_open_cmd.py | 1 - 4 files changed, 9 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6eb5460..57e76ca5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,10 @@ The format is based on [Keep a Changelog], and this project adheres to ## [Unreleased](https://github.com/bbugyi200/zorg/compare/0.4.0...HEAD) -No notable changes have been made. +### Changed + +* *BREAKING CHANGE*: Removed `zorg action open` command's column number + positional argument. ## [0.4.0](https://github.com/bbugyi200/zorg/compare/0.3.0...0.4.0) - 2024-03-11 diff --git a/README.md b/README.md index 124f8073..dbd129e7 100644 --- a/README.md +++ b/README.md @@ -125,19 +125,17 @@ subcommands: The output from running `zorg action open --help` is shown below: ``` -usage: zorg action open [-h] zo_path line_number column_number +usage: zorg action open [-h] zo_path line_number Open a zettel link if one exists on the provided zorg file line. positional arguments: - column_number The column number that your editor cursor is currently - located on. - line_number The line number that your editor cursor is currently located - on. - zo_path The file that your editor currently has open. + line_number The line number that your editor cursor is currently located + on. + zo_path The file that your editor currently has open. options: - -h, --help show this help message and exit + -h, --help show this help message and exit ``` The output from running `zorg db --help` is shown below: diff --git a/src/zorg/config.py b/src/zorg/config.py index fa5aa051..d90dd9c6 100644 --- a/src/zorg/config.py +++ b/src/zorg/config.py @@ -34,7 +34,6 @@ class OpenActionConfig(Config): zo_path: Path line_number: int - column_number: int class DbInfoConfig(Config): @@ -133,14 +132,6 @@ def clack_parser(argv: Sequence[str]) -> dict[str, Any]: "The line number that your editor cursor is currently located on." ), ) - action_open_parser.add_argument( - "column_number", - type=int, - help=( - "The column number that your editor cursor is currently" - " located on." - ), - ) # --- 'db' command db_parser = new_command( diff --git a/tests/test_action_open_cmd.py b/tests/test_action_open_cmd.py index 29ee5b33..9e95d2ad 100644 --- a/tests/test_action_open_cmd.py +++ b/tests/test_action_open_cmd.py @@ -38,7 +38,6 @@ def test_action_open( "open", str(zpath_to_links), str(lineno), - "1", ) assert exit_code == 0