Skip to content

Commit

Permalink
fix: lint and remove unused build deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Dec 5, 2023
1 parent a5aad15 commit 8ad0ab9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 41 deletions.
12 changes: 5 additions & 7 deletions homebrew_releaser/readme_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,11 @@ def generate_table(formulas: List) -> str:
rows = []

for formula in formulas:
rows.append(
[
f'[{formula["name"]}]({formula.get("homepage")})',
formula.get('desc'),
f'`brew install {formula["name"]}`',
]
)
rows.append([
f'[{formula["name"]}]({formula.get("homepage")})',
formula.get('desc'),
f'`brew install {formula["name"]}`',
])

table = pretty_tables.create(
headers=headers,
Expand Down
4 changes: 0 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ audit:
bandit:
{{VIRTUAL_BIN}}/bandit -r {{PROJECT_NAME}}/

# Builds the project in preparation for release
build:
{{VIRTUAL_BIN}}/python -m build

# Runs the Black Python formatter against the project
black:
{{VIRTUAL_BIN}}/black {{PROJECT_NAME}}/ {{TEST_DIR}}/
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@
DEV_REQUIREMENTS = [
'bandit == 1.7.*',
'black == 23.*',
'build == 0.10.*',
'flake8 == 6.*',
'isort == 5.*',
'mypy == 1.5.*',
'mypy == 1.7.*',
'pytest == 7.*',
'pytest-cov == 4.*',
'twine == 4.*',
'types-requests',
]

Expand Down
52 changes: 25 additions & 27 deletions test/unit/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,31 @@ def test_setup(mock_subprocess):
commit_email = '[email protected]'
Git.setup(homebrew_owner, commit_email, homebrew_owner, homebrew_tap)

mock_subprocess.assert_has_calls(
[
call(
[
'git',
'clone',
'--depth=1',
'https://x-access-token:[email protected]/Justintime50/homebrew-formulas.git',
],
stderr=-2,
text=True,
timeout=30,
),
call(
['git', '-C', 'homebrew-formulas', 'config', 'user.name', '"Justintime50"'],
stderr=-2,
text=True,
timeout=30,
),
call(
['git', '-C', 'homebrew-formulas', 'config', 'user.email', '[email protected]'],
stderr=-2,
text=True,
timeout=30,
),
]
)
mock_subprocess.assert_has_calls([
call(
[
'git',
'clone',
'--depth=1',
'https://x-access-token:[email protected]/Justintime50/homebrew-formulas.git',
],
stderr=-2,
text=True,
timeout=30,
),
call(
['git', '-C', 'homebrew-formulas', 'config', 'user.name', '"Justintime50"'],
stderr=-2,
text=True,
timeout=30,
),
call(
['git', '-C', 'homebrew-formulas', 'config', 'user.email', '[email protected]'],
stderr=-2,
text=True,
timeout=30,
),
])


@patch('subprocess.check_output')
Expand Down

0 comments on commit 8ad0ab9

Please sign in to comment.