Skip to content

Commit

Permalink
Fix style of generated files
Browse files Browse the repository at this point in the history
Signed-off-by: guillemdb <[email protected]>
  • Loading branch information
guillemdb committed Sep 29, 2024
1 parent 94df3ef commit 665d6e9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
python_version: ['3.10']
python-version: ['3.10']

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
python-version: ${{ matrix.python-version }}

- name: Setup Rye
id: setup-rye
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Upload coverage report
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: ${{ matrix.python_version == '3.10' && matrix.os == 'ubuntu-latest' && env.CODECOV_TOKEN != '' }}
if: ${{ matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' && env.CODECOV_TOKEN != '' }}
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false # optional (default = false)
Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
#
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.python_version }}
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: '3.10'
Expand Down
2 changes: 2 additions & 0 deletions src/mloq_template/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
- https://docs.python.org/2/using/cmdline.html#cmdoption-m
- https://docs.python.org/3/using/cmdline.html#cmdoption-m
"""

import sys
from mloq_template.cli import run


if __name__ == "__main__":
sys.exit(run())
3 changes: 2 additions & 1 deletion src/mloq_template/core.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
def compute(args):
"""Compute a placeholder for the compute function.
Examples:
Example:
>>> compute(["1", "2", "3"])
'1'
"""
return max(args, key=len)
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
def test_main():
cmd_name = "mloq-template"
output = subprocess.check_output([cmd_name, "foo", "foobar"], text=True)
assert cmd_name in output or "foobar\n" in output
assert cmd_name in output or "foobar\n" in output

0 comments on commit 665d6e9

Please sign in to comment.