Skip to content

Commit

Permalink
chore(#1): cleaning pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Apr 17, 2024
1 parent 8a4246f commit bd4829c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions objects/__init__.py
Expand Up @@ -25,5 +25,5 @@
"""
import pkg_resources

name = "samples-filter"
version = pkg_resources.get_distribution("samples-filter").version
NAME = "samples-filter"
VERSION = pkg_resources.get_distribution("samples-filter").version
8 changes: 7 additions & 1 deletion objects/__main__.py
Expand Up @@ -19,9 +19,15 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from objects import cli, name

"""
Command-line entry point.
"""
from objects import cli, name

"""
Entry point.
"""
def main():
cli.app(prog_name=name)

Expand Down
12 changes: 9 additions & 3 deletions objects/cli.py
Expand Up @@ -19,11 +19,15 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

"""
Cli runner.
"""
from typing import Optional

import typer

from objects import name, version
from objects import NAME, VERSION

app = typer.Typer()

Expand All @@ -37,10 +41,12 @@
# Don't forget to remove this puzzle.
def _version_callback(value: bool) -> None:
if value:
typer.echo(f"{name} v{version}")
typer.echo(f"{NAME} v{VERSION}")
raise typer.Exit()


"""
Run it.
"""
@app.callback()
def main(
version: Optional[bool] = typer.Option(
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Expand Up @@ -36,7 +36,9 @@
},
author='Aliaksei Bialiauski',
author_email='aliaksei.bialiauski@hey.com',
description='Command-line filter for GitHub repositories that contain "samples", instead of real project or framework or library',
description=
'Command-line filter for GitHub repositories that contain "samples",'
' instead of real project or framework or library',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='https://github.com/h1alexbel/samples-filter',
Expand Down

0 comments on commit bd4829c

Please sign in to comment.