Skip to content

Commit

Permalink
Lint python code
Browse files Browse the repository at this point in the history
Changes done by:
```
ruff check --fix --unsafe-fixes --ignore E722
```

Manual update to fix:
```
guw/main.py:73:36: F821 Undefined name `from_ft`
   |
71 |             return
72 |         feature_backup_name = self._backup_name(feature["name"])
73 |         logger.debug(f"Backing up {from_ft['name']} into {feature_backup_name}")
   |                                    ^^^^^^^ F821
74 |         repo.git.branch("-c", feature_backup_name)
75 |         self.to_push.append((feature_backup_name, feature["remote"]))
   |
```
  • Loading branch information
rgonzalezfluendo committed Nov 13, 2024
1 parent b7ce144 commit ec7b498
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions guw/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _backup_feature(self, repo, feature, backup=False):
if not backup:
return
feature_backup_name = self._backup_name(feature["name"])
logger.debug(f"Backing up {from_ft['name']} into {feature_backup_name}")
logger.debug(f"Backing up {feature['name']} into {feature_backup_name}")
repo.git.branch("-c", feature_backup_name)
self.to_push.append((feature_backup_name, feature["remote"]))

Expand Down Expand Up @@ -292,7 +292,7 @@ def check(self):
)
exit(1)

logger.info(f"The toml file is correct")
logger.info("The toml file is correct")

def add(
self,
Expand Down Expand Up @@ -437,9 +437,9 @@ def run():
)
_common_command_arguments(sync_args)
# Markdown subcommand
markdown_args = subparser.add_parser("markdown", help="Create a markdown content")
subparser.add_parser("markdown", help="Create a markdown content")
# Check subcommand
check_args = subparser.add_parser("check", help="Check toml file is correct")
subparser.add_parser("check", help="Check toml file is correct")
# Add subcommand
add_args = subparser.add_parser("add", help="Add a new feature branch")
_common_command_arguments(add_args)
Expand Down
1 change: 0 additions & 1 deletion tests/test_remove.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import shutil
import tempfile
import unittest
Expand Down

0 comments on commit ec7b498

Please sign in to comment.